Former Iranian president Akbar Hashemi Rafsanjani has revealed that Pakistan played a vital role in the development of his country's nuclear programme during the 1980s. However, it is not clear if the nuclear technology was sanctioned by the Pakistani government or run by its former nuclear czar, Abdul Qadeer Khan.

Rafsanjani, who served as Iran's president from 1989-1997, has revealed that Iran received designs and technology from Pakistan, which included 4,000 used centrifuges for enriching uranium. He said Iran was considering pursuing a nuclear deterrent capability when it began its atomic programme in the wake of the 1979 revolution.

"Abdul Qadeer Khan believed that the Islamic world had to have a nuclear bomb... The Pakistanis agreed to help us somewhat. We were at war, and we wanted to have such an option for the day our enemies wanted to use nuclear weapons. This was our state of mind," Rafsanjani said in an interview published by website Iran's Nuclear Hope. Rafsanjani said he and Iran's supreme leader Ayatollah Khamenei tried to meet AQ Khan when they were in Pakistan to set up a nuclear deal but were unsuccessfully.

In the wake of the 1979 revolution, the Germans had abandoned Iran's nuclear programme, which is when "I began thinking of alternative approaches", he said. "We had talks with the Pakistanis, a scientist called Mr Abdal-Qadir Khan (AQ Khan)," Rafsanjani said in the interview with Etemad newspaper.

"It was agreed that they (Pakistan) should help us a bit – for example, by delivering second-hand first-generation centrifuges, along with some designs – so that we could build it ourselves. Gradually, we started the work... The Pakistanis gave us 4,000 second-hand first-generation centrifuges, along with designs," he said.

Iran was also helped by China, who "in Saghand drilled very deep wells until we reached uranium", Rafsanjani said. "The Isfahan UCF (uranium conversion facility) was built by the Chinese. They produced the plans. We gave the Chinese $60 million for Isfahan, but they left the job unfinished," he said. "All sorts of black market offers", were on the table with "some offering us 90% enriched uranium, others 100%, and others offered technology."

Islamabad claims Khan was the one who gave away the nuclear technology to countries such as Iran, Libya and North Korea. He was placed under house arrest in 2004 after he confessed to supplying nuclear technology to other countries, but later said he had acted on the instructions of successive governments. In 2009, most of the restrictions imposed on Khan were lifted. However, the US or International Atomic Energy Agency (IAEA) investigators have not been allowed to question him.