Former British resident Binyam Mohamed, with white headgear, who had been held at the Guantanamo Bay prison since 2004, leaves a plane at Northolt military base in west London on Monday. He claims he was tortured at a covert CIA site in Morocco. Mohamed was the first Guantanamo prisoner released since U.S. President Barack Obama took office.Former British resident Binyam Mohamed, with white headgear, who had been held at the Guantanamo Bay prison since 2004, leaves a plane at Northolt military base in west London on Monday. He claims he was tortured at a covert CIA site in Morocco. Mohamed was the first Guantanamo prisoner released since U.S. President Barack Obama took office. (Lewis Whyld/PA Wire/Associated Press)

Binyam Mohamed, a former British resident who claimed he was tortured at a CIA site in Morocco, has been released from the Guantanamo Bay prison he was held in since 2004.

Mohamed, 31, who has been on a hunger strike for more than a month to protest his detention at the U.S. military base in Cuba, returned Monday to a British military base and was expected to be out of custody within hours.

"I hope you will understand that after everything I've been through, I am neither physically nor mentally capable of facing the media on the moment of my arrival back to Britain," Mohamed said in a statement released through his lawyers before his plane landed. He was expected to have brief interviews with police and immigration officials before his release.

British Foreign Secretary David Miliband said Britain has been asking for the return of former residents in the U.S. prison camp at Guantanamo since 2007.

"We very much welcome President Obama's commitment to close Guantanamo Bay and I see today's return of Binyam Mohamed as the first step toward that shared goal," Miliband said.

Mohamed was born in Ethiopia and moved to Britain at age 16, where he was granted residency.

He later converted to Islam and travelled to Pakistan and Afghanistan, where U.S. officials allege he fought alongside Taliban forces and later attended al-Qaeda training camps.

In 2002, Mohamed was arrested in Pakistan and accused of plotting al-Qaeda attacks in the United States. But war crimes charges against him were dropped at Guantanamo last year.

Mohamed has alleged that before his transfer to Guantanamo Bay, he was flown by the United States from Pakistan to Morocco, where he claims he was tortured.

During his time in Morocco, Mohamed said he was beaten and cut with razor blades, including hundreds of times on his genitals.

He has also alleged that two Canadians might have been involved in the torture.

Mohamed's lawyer said that in his client's diary, he wrote that after he refused to speak with Americans, a third-party intermediary, who called herself "Sarah, the Canadian," was brought in.

Allegations of torture

Mohamed alleged the she said that if he didn't talk to her, the Americans were going to "electrocute you, beat you and rape you."

He also claimed he was later interrogated for about an hour by another woman who spoke French and said she was a Canadian.

The Department of Foreign Affairs has said it had no knowledge of the allegations.

British and American lawyers are suing for secret documents they say prove the United States sent Mohamed to Morocco where he was tortured and prove that Britain knew of the mistreatment — a violation under the 1994 United Nations Convention Against Torture.

Britain's attorney general has also opened an investigation into whether there was criminal wrongdoing on the part of Britain or a British security agent from MI5 who interrogated Mohamed in Pakistan.

It is unclear where Mohamed will reside. His British residency expired while he was detention, meaning he must reapply.

His brother and sister live in the United States and his parents are believed to be back in Ethiopia.

With files from Associated Press