Gilani was abducted three years ago in his Pakistani hometown of Multan while he was campaigning for a seat in the Punjab provincial assembly. The Pakistani Taliban was initially blamed, but he was rescued from the captivity of an al-Qaida-linked organization. Omar Zakhilwal, Afghanistan's minister of finance, confirmed Gilani's release.
NBC News reported Gilani may have been sold and exchanged by different militant organizations, which would explain how he ended up in the Afghan city of Ghazni after being abducted in Multan.
"The counter-terrorism mission was planned and launched after evidence of terrorist activity was confirmed," the NATO's Resolute Support mission in Afghanistan said in a statement. "Four enemy combatants were killed as a result of the operation. No other injuries or damage was observed or reported."
Gilani will be returned to Pakistan after medical examinations. His father became prime minister in 2008 but was removed in 2012 by the Pakistani Supreme Court over contempt of court charges related to his refusal to re-establish a corruption investigation against former President Asif Ali Zardari.