MIAMI — A prisoner at the Guantanamo Bay detention center has been sent back to his native Saudi Arabia to serve out the remainder of a 13-year sentence, making him the first detainee to leave the U.S. base in Cuba since President Donald Trump took office.

The Pentagon announced the transfer of Ahmed Mohammed al-Darbi in a brief statement Wednesday. He had originally been scheduled to return home as part of a plea deal no later than Feb. 20.

Al-Darbi pleaded guilty before a military commission at the U.S. base in Cuba in 2014 to charges stemming from an al-Qaida attack on a French oil tanker. He is expected to serve out the rest of his sentence, about nine years, in a Saudi rehabilitation program as part of a plea deal that included extensive testimony against others held at Guantanamo

His lead defense counsel, Ramzi Kassem, said the transfer was the culmination of "16 long and painful years in captivity" by the U.S. at Guantanamo and in Afghanistan, with his children growing up without him and his own father dying.

"While it may not make him whole, my hope is that repatriation at least marks the end of injustice for Ahmed," said Kassem, a law professor at the City University of New York who has represented the prisoner since 2008.

Al-Darbi was captured at the airport in Baku, Azerbaijan, in June 2002 and taken to the U.S. base in Bagram, Afghanistan. He has testified to being kept in solitary confinement, strung up from a door in shackles, deprived of sleep and subjected to other forms of abuse as part of his early interrogation.

In a statement released by Kassem, who was part of a legal team that included two military officers, al-Darbi described what he expected to be an emotional reunion with his family in Saudi Arabia.

"I cannot thank enough my wife and our children for their patience and their love. They waited sixteen years for my return," he said. "Looking at what lies ahead, I feel a mixture of excitement, disbelief, and fear. I've never been a father. I've been here at Guantanamo. I've never held my son."

His transfer brings the number of men held at Guantanamo to 40, which includes five men facing trial by military commission for their alleged roles planning and supporting the Sept. 11, 2001, terrorist attack and another charged with the attack on the USS Cole in October 2000.

Al-Darbi, 43, pleaded guilty to charges that included conspiracy, attacking civilian objects, terrorism and aiding the enemy for helping to arrange the 2002 al-Qaida attack on the French tanker MV Limburg. The attack, which killed a Bulgarian crew member, happened after al-Darbi was already in U.S. custody and was cooperating with authorities, according to court documents.

Al-Darbi could have received a life sentence but instead got 13 years in the plea deal. He provided testimony against the defendant in the Cole attack as well as against a Guantanamo prisoner charged with overseeing attacks on coalition forces in Afghanistan in 2002-2006. Neither case has gone to trial.

Gen. Mark Martins, the chief prosecutor for the war crimes proceedings at Guantanamo, said in a February Defense Department memo that al-Darbi provided "invaluable assistance" to the U.S.

"Al-Darbi's testimony in these cases was both unprecedented in its detail regarding al-Qaida operations and crucial to government efforts to hold top members of that group accountable for war crimes," Martins wrote.

The agreement to repatriate al-Darbi was made under President Barack Obama, whose administration sought to gradually winnow down the prison population in hopes of eventually closing the detention center. Trump reversed that policy and has vowed to continue using the detention center.

In a separate statement Wednesday, the Defense Department said it had sent the White House a proposed set of guidelines for sending prisoners to Guantanamo in the future "should that person present a continuing, significant threat to the security of the United States." A Pentagon spokeswoman declined to provide any details about the new policy.

The New York-based Center for Constitutional Rights, which has represented many Guantanamo prisoners over the years, issued a statement welcoming the transfer of al-Darbi but criticizing the administration plan to maintain the detention center or perhaps even expand it.

"It is up to the courts, and the public, to challenge the Trump administration's ugly Guantánamo policy," it said.