A prisoner being held on suspicion of terrorism at Guantanamo Bay in Cuba was flown back to Afghanistan because U.S. officials determined he was mentally ill, an Afghan official said Sunday.

The inmate was only the second to be flown out of the U.S. base at Guantanamo since the United States began sending suspected terrorists to the Caribbean outpost three months ago.

Brig. Gen. Rick Baccus confirmed Thursday that he had "relinquished control over one detainee," but wouldn't give any details. A Pentagon spokesman, Army Lt. Col. Rivers Johnson, later said the prisoner was flown to Afghanistan.

The Afghan official, who spoke only on condition of anonymity, told The Associated Press that the man was flown to the city of Kandahar in southern Afghanistan because he was found to be suffering from schizophrenia.

Officials planned to bring him to the Afghan capital, Kabul, for further diagnosis, the official said.

The only other detainee to leave Guantanamo was Yasser Esam Hamdi, 22, who was flown to the United States on April 5 after records showed he was an American citizen born in Baton Rouge, Louisiana, to Saudi parents.

In all, 363 detainees of 34 nationalities are being held at Guantanamo.

Most of the prisoners were transferred to Guantanamo after being arrested in Afghanistan, and are suspected of links either to Afghanistan's former Taliban rulers or to Osama bin Laden's Al Qaeda terrorist network.

But officials have said recently that Guantanamo may become a detention center for a broad range of terrorism suspects.