Abdul Qadeer Khan, who was considered the father of Pakistan's atomic bomb and who secretly sold nuclear-weapons technology to such states as Iran and North Korea, died Sunday at age 85 after being hospitalized with covid-19.

Khan was hailed in Pakistan as a hero for helping the country become a nuclear power on par with rival India. But he was decried by many in the West for his leading role in a proliferation ring that illegally sold nuclear secrets to U.S. adversaries.

Khan, who in 2004 admitted to his involvement on national television, was later pardoned by then-President Pervez Musharraf. Yet he remained a revered figure at home.

"He was loved by our nation bec(ause) of his critical contribution in making us a nuclear weapon state," Prime Minister Imran Khan, no relation to the scientist, wrote Sunday on Twitter. "For the people of Pakistan he was a national icon."

Khan was admitted Aug. 26 to the Khan Research Laboratories Hospital after testing positive for covid-19, Reuters reported. He was later transferred to a military hospital in the northern city of Rawalpindi. He was released several weeks ago but readmitted after his situation deteriorated, Al Jazeera reported.

Khan worked for nearly three decades to build up Pakistan's nuclear capabilities - efforts that he said were aimed at keeping the country safe and able to defend itself against rivals like nuclear-armed India. But his concurrent work as the core of an illicit network that helped countries skirt international sanctions and illegally trade in atomic technologies also fueled a nuclear proliferation crisis.

The CIA had long suspected that Khan was secretly sharing nuclear know-how beyond Pakistan's borders. British and American intelligence agencies discovered part of his network in the early 2000s and tipped off Pakistan. Under U.S. pressure, Musharraf removed Khan from the helm of Pakistan's national nuclear laboratory. Khan, however, remained a scientific adviser to the government and retained his access to nuclear dealings.

By 2004, as pressure ramped up, Musharraf fired Khan, who publicly admitted to his illicit proliferation activities. Musharraf's government said that Khan was a rogue actor and that it had no knowledge of his nuclear network. Pakistan, however, never permitted an international investigation. Khan later claimed he had been scapegoated.

After the national scandal, Khan lived for several years under house arrest in a palace-like home in Islamabad, Pakistan's capital. He was released from house arrest in 2009, though authorities continued to closely watch his movements.

Khan was born in Bhopal, India, and moved to Muslim-majority Pakistan after the 1947 partition of the Indian subcontinent. After studying metal technologies, he went on to work in Amsterdam at a company enriching uranium for European firms. In 1974, India tested its first nuclear weapon. Khan decided to return to Pakistan and work on the nation's nuclear technologies.

By 1981, Pakistan's then-military ruler, Mohammed Zia ul-Haq, renamed the country's nuclear-research complex the Dr. A.Q. Khan Research Laboratories.

Pakistan tested its first nuclear device in 1998, by which point Khan had already gained international notoriety.