By Frances Harrison
BBC News, Tehran
A letter from 1988 in which Iran's top commander says Iran could need a nuclear bomb to win the war against Iraq has come to light in Tehran.
Ayatollah Khomeini wrote the letter during the Iran-Iraq war
The commander is quoted in the letter, written by the father of the Iranian revolution, Ayatollah Khomeini, to top officials in the final days of the war.
It has only now been made public - by former President Hashemi Rafsanjani.
The letter seems at odds with Tehran's statements that Iran is not seeking a bomb because it is against Islam.
The letter from Ayatollah Khomeini lists the requirements of military commanders if they are to continue fighting against Iraq.
It mentions more aircraft, helicopters, men and weapons, and also quotes the top commander saying Iran would within five years need laser-guided and atomic weapons in order to win the war.
Some Iranian news agencies have, however, deleted the reference to atomic weapons in the letter.
It is sensitive because Iran has always said it is not seeking a nuclear weapon and leading clerics say an atomic bomb would be against Islam.
Ayatollah Khomeini's letter also reveals how challenged Iran's economy and military were by the eight years of war against Iraq.
The letter quotes the prime minister of the time saying the economy was operating at a level below zero and volunteers for the front were in short supply.
Ayatollah Khomeini's letter has been made public at a time when Iran is preparing for a possible confrontation with the US over its nuclear programme.
But it also comes against a background of an argument between Mr Rafsanjani and a top military commander over who was instrumental in persuading Ayatollah Khomeini to agree to a ceasefire with Iraq that the Ayatollah himself likened to drinking a poisoned chalice.