A Saudi prisoner at the Guantanamo Bay detention center has been transferred to his native country to serve out the balance of his 13-year sentence, the Pentagon announced Wednesday.

The prisoner, Ahmed al-Darbi, is the first to leave the U.S. base in Cuba since President Donald Trump took office. He had originally been scheduled to return home as part of a plea deal no later than Feb. 20.

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. Earlier this year, Trump signed an executive order to keep the camp open indefinitely.

Al-Darbi pleaded guilty before a military commission in 2014 to charges stemming from an 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."

Al-Darbi, 43, pleaded guilty to charges that included conspiracy, attacking civilian objects, terrorism and aiding the enemy for helping to arrange the 2002 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 a defendant in the October 2000 attack on the USS Cole, 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 [sic] operations and crucial to government efforts to hold top members of that group accountable for war crimes," Martins wrote.

Al-Darbi's transfer reduces the number of detainees held at Guantanamo Bay to 40. That number includes includes five men facing trial by military commission for their alleged roles planning and supporting the Sept. 11, 2001, terrorist attack.

The Associated Press contributed to this report.