Convicted terrorism plotter Jose Padilla was handed a new prison sentence Tuesday of 21 years after a federal appeals court ruled his original 17-year sentence was too lenient.

Padilla was convicted in 2007 on charges of supporting Al Qaeda and terrorism conspiracy. The new sentence was imposed by U.S. District Judge Marcia Cooke, who originally gave Padilla more than 17 years in prison. She also previously gave Padilla, a U.S. citizen and Muslim convert, credit for the more than three years he was held without charge as an enemy combatant at a South Carolina Navy brig.

The 11th U.S. Circuit Court of Appeals in 2011 determined that Cooke erred in giving Padilla credit for the brig years and also failed to properly account for his "heightened risk of dangerousness" due to training at an Al Qaeda camp in Afghanistan. In addition, the appeals judges ruled that Padilla -- a former Chicago "Latin Kings" gang member -- deserved a longer sentence because of his numerous previous arrests.

"He is far more sophisticated than an individual convicted of an ordinary street crime," the appeals court concluded.

Padilla's attorneys had asked for 21 years. Prosecutors wanted 30.

Padilla, 43, was arrested in 2002 at Chicago's O'Hare International Airport during the tense months after the 9/11 attacks. At the time, authorities said Padilla was on an Al Qaeda mission to detonate a radioactive dirty bomb in a major U.S. city. It later emerged that the "mission" was only a sketchy idea. The allegations against Padilla were dropped before he was added in 2005 to an existing South Florida terrorism case.

Before his indictment, Padilla's attorneys challenged the right of then-President George W. Bush's administration to continue holding a U.S. citizen like him as a combatant without charge. Because he was finally charged criminally, the U.S. Supreme Court never got a chance to rule on the question. Cooke was appointed by George W. Bush.

Trial testimony showed that Padilla had begun frequenting a Florida mosque where his co-defendant, Adham Hassoun, was recruiting fighters for Muslim jihad overseas. Padilla eventually traveled to Egypt and on to Afghanistan. A key piece of evidence against him was his name on an Al Qaeda form listing attendees at the al-Farook terrorism training camp.

Hassoun and a third defendant, Islamist propagandist Kifah Jayyousi, where also convicted in the case. Hassoun is serving 15 years and Jayyousi 12 years.

Padilla's lawyers tried before trial to get the case thrown out by claiming his treatment at the brig amounted to torture, which U.S. officials have repeatedly denied. His attorneys say he was forced to stand in painful stress positions, given LSD or other drugs as "truth serum," deprived of sleep and subjected to loud noises, extreme heat and cold and noxious odors.

"Our government has subjected Jose to extraordinarily harsh conditions of solitary confinement and isolation," Padilla's lawyer wrote in court papers.