An Indian prisoner Hamid Nihal Ansari was released by Pakistan on Monday. In 2012, he was detained by the country's intelligence agencies.
In 2015, he was sentenced to three years' imprisonment by a military court for possessing a fake Pakistani identity card.
Ansari (33) was lodged in the Peshawar Central Jail. On December 15, his three-year jail term ended. In 2012, he went missing after he was taken into custody by Pakistani intelligence agencies and local police in Kohat.
US blacklists Pakistan over religious freedom violations, Islamabad calls it 'politically motivated'
"Ansari is being released upon completion of his sentence and is being repatriated to India," Pakistan Foreign Office Spokesperson Mohammad Faisal said.
He claimed that Ansari was an "Indian spy who had illegally entered Pakistan and was involved in anti-state crimes and forging documents."
He entered Pakistan from Afghanistan, reportedly to meet a girl he had befriended online. A two-judge Peshawar High Court bench, comprising Justice Roohul Amin and Justice Qalandar Ali Khan, on Thursday heard an appeal filed by Ansari through his lawyer Qazi Muhammad Anwar.
Anwar informed the bench that both the Ministry of Interior and authorities of prison, where he was lodged, were completely silent about his release and deportation to India.
After hearing this, Justice Khan asked the Additional Attorney General to explain how they would keep the prisoner in jail after completion of his term.
An officer, representing the interior ministry, informed the court that a prisoner could be kept for one month while the legal documents were being prepared.
After knowing the legal position, the court directed the ministry to make all the arrangements within a month for releasing and deportation of the prisoner.
(With PTI inputs)