Ayatollah Ali Khamenei has publicly said nuclear weapons are forbidden under Islam, often described as a fatwa. Analysts debate how absolute or permanent that stance is in practice, but it’s the official line from Iran.
Iran should drop this fatwa nonsense, because it's clear Israel and the US are hellbent on destroying them.
They should negotiate with Pakistan, China, or Russia, and arrange for 100-200 nukes to be delivered onsite ASAP. An amount that equals Israel's nuke supply. All this drama would be over.
Notice how the US is not starting shit with North Korea? Because they have nukes. Ironically the world might be safer for smaller nations if they possess nukes.