KABUL, Afghanistan -- A joint raid by U.S. and Afghan forces on Tuesday rescued the son of a former Pakistani prime minister from a three-year-long Taliban captivity in Afghanistan, officials said.

Ali Hiader Gilani was found during the raid conducted near Afghanistan's eastern border with Pakistan, according to Afghan President Ashraf Ghani's office. Gilani, believed to be in his 30s, is the son of Pakistan's former Prime Minister Yusuf Raza Gilani whose secular anti-Taliban Pakistan People's Party's led several major offensives against Islamic militants.

In Pakistan, the foreign ministry said the Afghan National Security Adviser Mohammad Hanif Atmar told Pakistan's foreign affairs adviser, Sartaj Aziz, in a telephone call of the development.

Ghani's spokesman, Zafar Hashemi, told The Associated Press that Gilani was being taken to the Pakistani embassy in Kabul. The embassy said he had not yet arrived.

Get Breaking News Delivered to Your Inbox

The raid took place on Tuesday in the Gayan district of Pakitka province, Hashemi said -- not in Ghazni province as the Pakistani Foreign Office earlier reported.

The elder Gilani, who served as prime minister from 2008 to 2012, said last year that the kidnappers demanded the release of several al Qaeda prisoners in exchange for his son. He also said that the captors had let his son talk to him by phone for eight minutes, and that he was being held somewhere in Afghanistan.

Gunmen kidnapped the younger Gilani in May 2013, several days before the general elections in his central Pakistani hometown of Multan.

There was no immediate comment from U.S. or Afghan officials.

Abdul Qadi Gilani, a brother of the younger Gilani, praised Afghan authorities and Pakistan's army chief Gen. Raheel Sharif for his brother's successful recovery. He said the army chief also called their father about the rescue. A jubilant elder Gulani was seen on Pakistani TV attending an election rally after hearing the news.

"This is a very good day for me," the father said as his other son, Abdul Qadir, told reporters in Multan that his brother will arrive from Afghanistan to Islamabad later Tuesday.

"I am very happy and I have no words to express my joy," Abdul Qadir said.

Pakistan's Prime Minister Nawaz Sharif issued a statement expressing pleasure over the rescue while the current leader of the People's Party, Bilawal Bhutto Zardari, announced on Twitter the Afghan ambassador in Islamabad first called the elder Gilani to tell him about his son.

The Pakistani Taliban have fought the state for over a decade, killing tens of thousands of people in a bid to install their own harsh Islamic system.