The United States government has surrendered three prisoners, including a chief Taliban officer to Pakistani forces on Saturday, according to Reuters.

Latif Mehsud, a Pakistani Taliban commander was captured by U.S. forces in October of 2013 along with his two bodyguards. The three were then detained in a prison facility near the U.S.'s largest base in Afghanistan.

The transfer of Mehsud to Pakistan was confirmed by a security official from the country.

"[Tehreeke-Taliban Pakistan] senior commander Latif Mehsud who was arrested was handed over to Pakistani authorities along with his guards," official said in a statement. "They reached Islamabad."

The U.S. government has decided to return the prisoners to their home country in preparation for the military's departure from Afghanistan, which is scheduled to take place by the end of this month, The Hill reported.

Once the military leaves, the U.S. government will be stripped of its legal rights to hold people inside its Afghan prison facility near Bagram airfield.

As for the remaining prisoners, they will either be transferred to Guantanamo Bay or be brought to the U.S. to continue their sentence.

"We're actually just going through and returning all the third-country nationals detained in Afghanistan to resolve that issue," a U.S. embassy spokesperson told Reuters.

The arrest of Mehsud last year angered Hamid Karzai, the president of Afghanistan at that time. According to his spokesperson, Meshud was in the process of being recruited by Afghan officials for peace talks operations when his convoy was intercepted by U.S. forces.

Karzai's administration considered the intervention of the U.S. in local matters as a violation of Afghanistan's sovereignty.

Nazifullah Salarzai, the spokesperson of current Afghan President Ashraf Ghani, noted that the government will investigate the events that led to Meshud's arrest.

"We are working on gathering information on how this took place," he said in a statement.