A court has heard how a terror suspect from London allegedly received terror training from al-Qaeda in Yemen.
Minh Quang Pham is accused of travelling overseas to "wage jihad and martyr himself", Westminster Magistrates Court was told.
The United States wants to extradite him to face trial on terrorism charges.
But his lawyers say evidence obtained from torture could be used against him in a US court.
Mr Pham, who is a Vietnamese-born British national, was arrested at Heathrow Airport in July 2011 after spending seven months in Yemen. He was found in possession of a live round of ammunition.
He is charged by US prosecutors with providing material support to a foreign terrorist organisation, receiving military-style training and possessing machine guns in furtherance of crimes of violence.
If convicted, he faces life in prison.
Westminster Magistrates' Court heard allegations that Mr Pham, who lived in the New Cross area of London, left his pregnant wife to meet senior figures of the group, al-Qaeda in the Arabian Peninsula (AQAP), in late 2010.
He is accused of swearing an oath of allegiance to the group, which is an offshoot of Osama Bin Laden's original organisation.
The court heard how much of the evidence against Mr Pham came from a witness who is now co-operating with American investigators after being arrested in 2011.
Peter Caldwell, prosecuting, said the witness, Ahmed Abdulkadir Warsame, had described seeing Mr Pham at AQAP safe houses around March 2011, where he told him he had "travelled to Yemen in order to wage jihad on behalf of AQAP and to martyr himself".
It was alleged that Mr Pham, who used the pseudonym Amin, "almost always carried" a Kalashnikov assault rifle during his time in Yemen.
Detainee treatment concerns
The court heard that Mr Warsame also told US investigators he had seen Mr Pham working closely with senior AQAP leaders on the publication of the notorious online propaganda magazine, Inspire - which is written in English and aimed at Western supporters of jihad.
One of its editions included a detailed recipe titled, "how to make a bomb in the kitchen of your mom", which has been found on the computers of a number of terror suspects in Britain.
The court was told that the two men Mr Pham allegedly worked with on Inspire were American citizens who are now dead.
That is believed to be a reference to the extremist preacher, Anwar al-Awlaki, and the editor of Inspire, Samir Khan, who were killed in a CIA drone strike months after the arrest of Mr Pham.
Hugh Southey QC, defending, said Mr Warsame had been held for two months on a US warship before he was handed over to the US agency, the Federal Bureau of Investigation (FBI).
Mr Southey said: "Little is known about the way in which Mr Warsame was treated. There are legitimate concerns about the way that detainees of the American armed forces have been treated."
The court heard that the US Department of Justice denies any mistreatment of Mr Warsame.
Mr Southey then told the court: "This is the case where there is no obvious American angle. This is someone who has never been to America. He is not an American citizen. The conduct relied upon is outside the jurisdiction of the United States."
The case continues.