Updated

A federal appeals court Friday sided with the Bush administration and reversed a judge's order that the government either charge or free "dirty bomb" suspect Jose Padilla (search).

The three-judge panel of the 4th U.S. Circuit Court of Appeals (search) ruled unanimously that the president has the authority to detain a U.S. citizen closely associated with Al Qaeda (search).

"The exceedingly important question before us is whether the President of the United States possesses the authority to detain militarily a citizen of this country who is closely associated with al Qaeda, an entity with which the United States is at war," Judge Michael Luttig wrote. "We conclude that the President does possess such authority."

A federal judge in South Carolina had ruled in March that the government cannot hold Padilla indefinitely as an "enemy combatant," a designation President Bush gave him in 2002. The government views Padilla as a militant who planned attacks on the United States.

The administration has said Padilla, a former Chicago gang member, sought to blow up hotels and apartment buildings in the United States and planned an attack with a "dirty bomb" radiological device.

Padilla was arrested at Chicago's O'Hare International Airport in 2002 after returning from Pakistan. The federal government has said he was trained in weapons and explosives by members of Al Qaeda.

Padilla, a New York-born convert to Islam, is one of only two U.S. citizens designated as enemy combatants. The second, Louisiana native Yaser Hamdi (search), was released last October after the Justice Department said he no longer posed a threat to the United States and no longer had any intelligence value.

Hamdi, who was captured on the battlefield in Afghanistan in 2001, gave up his American citizenship and returned to his family in Saudi Arabia as a condition of his release.