And Khan did get married, to a woman named Rabia Yaqoob — not in Dubai, but in Pakistan.

Khan returned to Baltimore alone in March 2002 and worked at a gas station operated by his family. At the same time, he attempted to recruit a "close associate" to work for Mohammad and al-Qaida, according to court papers.

In July, he was ordered back to Pakistan by Mohammad or another al-Qaida associate. He made the trip the following month, leaving Baltimore for the last time.

Earlier in 2002, prosecutors say, an al-Qaida affiliate in Thailand had discussed plans to bomb "soft targets" such as bars, cafes and nightclubs frequented by "Westerners" in Thailand, Indonesia, the Philippines and other countries in Southeast Asia.

Now that Khan was back in Pakistan, Mohammad found a role for him. He would take his wife to Thailand, where he would use their honeymoon as a cover for his actual purpose: delivering money that would help finance the attack in Indonesia. He was directed to conduct Internet research on tourist activities in Thailand so he could dress appropriately and pass unnoticed.

Khan and wife traveled to Bangkok on Dec. 24, 2002. There he gave the money to a member of the al-Qaida affiliate Jemaah Islamiyah.

Members of Jemaah Islamiyah carried the cash to Jakarta. They used it to rent a safe house with an enclosed garage and build a truck bomb.

On Aug. 5, 2003, a volunteer drove the truck into the front entrance of the J.W. Marriott hotel and detonated the bomb.

The members of Jemaah Islamiyah had chosen the hotel, prosecutors say, "because they believed it had a large American presence."

There is no indication in court papers that Khan's wife was aware of his role in the attack. She remains in Pakistan with the couple's daughter. Khan has never met the child.

At the time of the bombing, Khan was already in custody. Pakistani security forces had raided a family home in Karachi, capturing Khan, a brother, a sister-in-law and an infant niece. The sister-in-law and the niece were released after a week, the brother after a month.

Khan was turned over to the CIA, which would hold him for the next three years at a still-undisclosed location or locations.

Khan and his attorneys have said he was tortured while in CIA custody. Khan's father told a military panel in 2007 that "the Americans tortured him for eight hours at a time, tying him tightly in stressful positions in a small chair until his hands, feet and mind went numb."

"He was often hooded and had difficulty breathing," Ali Khan said in the statement. "They also beat him repeatedly, slapping him in the face, and deprived him of sleep."

Khan staged hunger strikes and twice attempted suicide — once cutting through an artery.

Under the plea agreement, Khan has forfeited his right to sue the government over his treatment.

"He was tortured," Dixon said. He said he could not provide details of Khan's allegations, which have been classified — but said the government should.

"That is something that the United States has to address," he said. "The United States has to accept responsibility for what happened to him, just the way that he accepted responsibility for his own actions."

Khan appeared fit and relaxed during his arraignment last week. Dressed in a suit and shorn of the thick beard with which he had been photographed, he was polite and respectful in his responses to Pohl.

He is scheduled to return before the tribunal in four years. Under the agreement, If he has given prosecutors his "full and truthful cooperation," he may be sentenced to no more than 15 more years.