WASHINGTON — The last American prisoner in Iraq, a Hezbollah commander linked to the kidnapping deaths of four U.S. soldiers, was turned over to the Iraqi government Friday, the White House said.

U.S. officials have long feared that such a transfer would lead to Ali Mussa Daqduq's release from prison. But his case became enmeshed in both international diplomacy and the Washington political debate over how best to prosecute suspected terrorists.

Under President George W. Bush, prosecutors had planned to someday charge Daqduq in a U.S. criminal court. But those plans were scrapped after Obama took office and lawmakers began restricting the president's ability to bring terrorist suspects into the United States for trial.

Many Republicans had wanted Daqduq prosecuted before a military tribunal at the Guantanamo Bay base in Cuba. The Obama administration had hoped a compromise would be to prosecute Daqduq in a first-of-its-kind military commission on U.S. soil.

But the Iraqi government would not let the United States take Daqduq out of the country for trial, White House spokesman Tommy Vietor said.

"We have sought and received assurances that he will be tried for his crimes," Vietor said Friday.

It was not immediately clear what charges he could face. The U.S. has said he was part of a brazen raid in which four American soldiers were abducted and killed in the Iraqi holy city of Karbala in 2007.

Iraq has had a shoddy record on detainee security. Last year, just a week after the U.S. turned more than 1,000 detainees at its Camp Cropper prison over to Iraqi control, four al-Qaida-linked detainees escaped. An investigation showed that the detainees had inside help.

That had lawmakers worried that Daqduq would return to Hezbollah soon after his transfer. Shortly before the White House announcement, Sen. Mark Kirk, a Republican, was gathering signatures on a letter to Obama.

"Daqduq's Iranian paymasters would like nothing more than to see him transferred to Iraqi custody where they could effectively pressure for his escape or release," Kirk wrote. "We truly hope you will not let that happen."

With the war over and Iraq a sovereign country, the United States is now bound by its diplomatic agreements with Baghdad. Shuttling Daqduq out of the country without the approval of the Iraqi government would have risked damaging U.S.-Iraqi relations.

Vietor said a trial at Guantanamo Bay was never an option, either for the Iraqis or for the administration.

"The policy of this administration, because we believe it's in our national security interest, is to close the detention facility at Guantanamo Bay, not add to the population," he said.

Two Iraqi officials, speaking under condition of anonymity because they were not authorized to discuss the case, said Daqduq was in the custody of Iraqi judiciary authorities in Baghdad. Daqduq will stand before an Iraq investigative judge, one official said. Investigative judges decide whether there is enough evidence for a trial and recommend specific charges, somewhat like a grand jury does in the U.S. system.

Associated Press writers Donna Cassata in Washington and Qassim Abdul Zahra in Baghdad contributed to this report.