The German newspaper Die Welt published an interesting article yesterday which discusses the findings of a Swedish analyst who worked on atmospheric radiation data resulting from Korean nuclear tests.
Long story short: Iran may have tested a nuclear bomb in North Korea in 2010.
You can find the online version of the article here (in German): Nuklearprogramm: Iran soll Atombombe in Nordkorea getestet haben - Nachrichten Politik - Ausland - WELT ONLINE
Basically it says that data showed that Korea detonated uranium bombs. However, the only enrichment faclities in North Korea known to the IAEA are plutonium enrichment sites. So this means that North Korea either has secret enrichment sites or that the uranium came from somewhere else. Possibily from Pakistan or from Iran. This is supported by western intellignce assessments which concluded in the past that Iran may have been working on a nuclear weapon up to 2003 and that nuclear material enriched up to that point is unaccounted for (IAEA only started controlling Iranian enrichment sites from 2007 on).
The article continues to state that the IAEA has documents which show that Ayatollah Chamenei ordered a nuclear weapons program to be resumed because nuclear weapons were necessary as safeguard of the Iranian revolution and as preparation for the arrival of the imam Mahdi (who, according to Islam, will rule the world in the last years before the day of judgement).
Then there is some info on other cases of international collaboration on nuclear tests, which doesn't seem to be uncommon.
Much of this is speculation and based on "western intelligence", but Die Welt is one of the better German newspapers, so there may be some truth to it.
Well isn't that just fantastic...
I can't comment on the article (since I don't read German) beyond the summary you've given me. I can see how Iran would justify this saying that it's necessary for the protection of the 'revolution', but as a way to make way for the Mahdi? I don't know if that's embellishment on the part of the reporter or an incorrect interpretation. I know that some Iranians saw the return of Khomeini as the return of the lost 12th Imam who in Twelver Shi'a discourse is seen as Mahdi (this is not the case in other Muslim camps though), but Khomeini never saw himself as such. Might be some sensationalism on their part, not sure.
I know of course when similar stuff was brought up over the Vela Incident and using that as a possibility of it being a nuclear test by Israel through Apartheid South Africa, the professionals usually scoff and discount at such a possibility.
The article didn't say that Khamenei considers himself to be the mahdi but rather that he thinks that nuclear weapons are necessary to ensure the arrival of the mahdi (the unspoken message here being that Iran's supreme leader might think that destroying Israel with nuclear weapons is a condition for the mahdi's arrival). There isn't any source except that the author states that a document with this information is in the possesion of the IAEA. Doesn't seem so unlikely considering that Khamenei mentioned the mahdi before.
The Vela incident was also mentioned in the article and described as likely to have been one of many known cooperations on nuclear tests. The author of the article is an expert on nuclear weapons who worked for the German government at some point.