"He was freed Sunday. He has reached the Pakistan Embassy in Baghdad. He is safe," Information Minister Shaikh Rashid Ahmed told The Associated Press. He declined to give further details.
Malik Muhammed Javed was abducted on 9 April after he left his residence in Baghdad to attend prayers at a mosque. The Pakistani government said after his abduction he was in the custody of a previously unknown Islamist militant group, Umar ibn al-Khattab.
Aljazeera had aired a video that claimed to show Javed after his abduction. Javed's captors had allowed him to speak to Pakistani officials several times, and officials in Islamabad had said the government was making all efforts to secure his release.
Pakistan is a key ally of the United States in its "war on terror" in Afghanistan, but it opposed the US-led attacks in Iraq and refused to send troops.
Pakistan's Foreign Ministry had said that the Umar ibn al-Khattab group demanded a ransom for Javed's release.
Ahmed, however, declined to comment on whether any ransom had been paid.
Waiting for call
Javed's son, Bilal Malik, said Pakistan's prime minister had called him late on Sunday to tell him his father had been freed.
"We got a call from the prime minister at 11.30pm (0630 GMT). It was a brief call from him and I spoke with him," he said. "He said 'I have good news and it is that your father has been released. Congratulations to you.'
"The prime minister said he [Javed] will come home in a day or two. He is fine."
Bilal Malik said the family was waiting to receive a call from his father.
"We are so happy. We have been praying. The whole of Pakistan has been praying along with us. Thanks be to God. We have been patient for the past 16 days since he was kidnapped. Our prayers have been answered."
Javed, a deputy counsellor at the Pakistani embassy in Baghdad, is the fourth Pakistani to be kidnapped in Iraq.
One was released in June, but two others were killed after being abducted a month later. The kidnappers of the pair did not release their bodies.
Militants who claimed they had kidnapped and then slain the two men had asked Pakistan not to send its troops to Iraq. Although Islamabad said it had taken no decision to deploy troops in Iraq, the kidnappers killed the pair.
Pakistani officials have said the Umar ibn al-Khattab group was likely named after Islam's second caliph, Umar ibn al-Khattab, who was a close ally of the Prophet Muhammad and one of his successor Caliphs.
The name is common in Arabic. Among those who have used it is a Saudi-born militant who was linked to al-Qaida and is thought to have been killed fighting Russian forces in Chechnya in 2002.