Updated

An Iraqi court has rejected a request to send a Hezbollah commander to the United States for trial, a decision that apparently ends the Obama administration's efforts to prosecute the Lebanese militant figure held in Iraq for the 2007 killings of five American soldiers.

The U.S. believes Ali Mussa Daqduq is a top threat to Americans in the Middle East, and had asked Baghdad to extradite him even before two Iraqi courts found him not guilty of masterminding the 2007 raid on an American military base in the holy Shiite city of Karbala.

But the July 30 decision by the Iraqi central criminal court, a copy of which was obtained by The Associated Press, ordered that Daqduq be freed immediately. It also makes it clear that Iraq believes the legal case against him is over.

"It is not possible to hand him over because the charges were dropped in the same case," the three-judge panel ruled. "Therefore, the court decided to reject the request to hand over the Lebanese defendant Ali Mussa Daqduq to the U.S. judiciary authorities, and to release him immediately."

The U.S. Embassy in Baghdad declined to comment Thursday and referred questions about the case to Washington. At the Pentagon, Defense spokesman Lt. Col Todd Breasseale said Daqduq "should be held accountable for his crimes. Period."

In an AP interview last month, the national security adviser to Vice President Joe Biden said the White House has asked Iraq's highest appeals court to review and overturn its order to free Daqduq. It was not immediately clear Thursday whether that review was continuing.

Breasseale said the Pentagon "will continue to work closely with the Iraqi government to explore all legal options to pursue justice in this case."

Daqduq's lawyer, Abdul-Mahdi al-Mitairi, said the militant is still being held under house arrest in Baghdad's heavily fortified Green Zone. But he said he will push to have Daqduq released before the end of Ramadan, the ongoing Muslim holy month that ends later in August.

Washington believes the Lebanese-born Daqduq worked with Iranian agents to train Shiite militias to target the U.S. military during the years of sectarian violence that gripped Iraq over the last decade. His case has illustrated the tricky aftermath of the long U.S. military campaign in Iraq that ended last year and has elements of both Iraqi and U.S. internal politics.

Daqduq was detained for more than four years by the U.S. military before it left Iraq last December. He was handed over to Iraqi authorities as required when the troops left, amid a debate between the Democratic White House and Republicans in Congress over whether high-risk terror suspects should be brought to the U.S. for trial.

Republican lawmakers said Daqduq was too much of a public threat to be incarcerated on American soil, and wanted him to be held at the contentious military detention center at the Navy base on Guantanamo Bay in Cuba. President Barack Obama refused. He has promised to close the detention center at Guantanamo, which became a worldwide symbol of detainee abuses during the Republican administration of President George W. Bush.

Since then, two Iraqi courts have cleared Daqduq of the terrorism and forgery charges that Iraq's government lodged against him. The new court order says the Pentagon issued the extradition request but did not specify when.

Iraqi government officials privately acknowledge they have little, if any, legal basis for continuing to detain him.