While Riyadh signed an agreement with the US in 2008 stating that it would only pursue nuclear power for civil purposes, the Saudi government is likely to abandon the deal if Tehran had a nuclear bomb.
"There is no intention currently to pursue a unilateral military nuclear program but the dynamics will change immediately if the Iranians develop their own nuclear capability," a senior Saudi source said.
"Politically, it would be completely unacceptable to have Iran with a nuclear capability and not the kingdom."
In such an eventuality, Saudi Arabia would start work on a new ballistic missile platform, purchase nuclear warheads from overseas and aim to source uranium to develop weapons-grade material.
Officials in the West believe Saudi Arabia and Pakistan have an understanding in which Islamabad would supply the kingdom with warheads if security in the Gulf was threatened.
A Western official told The Times that Riyadh could have the nuclear warheads in a matter of weeks of approaching Islamabad. Other vendors were also likely to enter into a bidding war if Riyadh indicated that it was seeking nuclear warheads.
Both Saudi Arabia and Pakistan have denied the existence of any such agreement.
Like the US and many other countries in the West, Saudi Arabia believes that Iran is seeking to build nuclear weapons and the kingdom is preparing for a worst-case scenario, the Saudi sources said.