NOUAKCHOTT, Mauritania — A former al-Qaida militant who gained fame with the publication of a diary about life at the U.S. detention center at Guantanamo Bay, Cuba, was released Monday, and returned to Mauritania after nearly 14 years of detention.

Mohamedou Ould Slahi landed in the capital on a U.S. military plane, said Lemine Mohamed, the police chief in Nouakchott. Ould Slahi will speak with anti-terror police before heading to his home, said Mohamed.

The Mauritanian had been held without charges since 2002. On July 14, Ould Slahi was approved for release from the detention center at the U.S. base in Cuba.

The U.S. Department of Defense confirmed his transfer Monday.

Ould Slahi, who is about 46, received international acclaim for his “Guantanamo Diary,” a memoir of his captivity including accounts of harsh interrogations at Guantanamo and other sites. It became an international best-seller after it was published in January 2015, and prompted an international campaign by human rights groups calling for his release, along with Guantanamo’s closure.

U.S. officials have said in military and court files that Slahi traveled in the early 1990s from Germany, where he was attending college, to Afghanistan to fight with Islamic rebels against a communist government supported by the Soviet Union. He later trained with and swore allegiance to al-Qaida and had close contacts over the years with significant figures in the organization, including two men who became hijackers in the Sept. 11, 2001, terrorist attack on the U.S.

Ould Slahi was detained in Mauritania in November 2001 and questioned by FBI agents in connection with, among other things, the millennium bomb plot, which included a thwarted plan to set off explosives at the Los Angeles International Airport on New Year’s Eve 1999.

The CIA rendered him to a prison in Jordan, and he was then sent briefly to a U.S. base in Afghanistan before being flown to Guantanamo. His handwritten memoir was eventually published with numerous redactions after a lengthy legal battle and negotiations to get the U.S. government to declassify it.

With his release, there are now 60 detainees at the U.S. base at Guantanamo Bay, Cuba. That includes 19 who have been approved for release and are expected to leave in the coming months before President Barack Obama leaves office.

Obama had sought to close the detention center but was blocked by Congress, which enacted legislation forbidding the transfer of detainees to the U.S.

AP writer Ben Fox in Miami contributed to this report.