By Jon Leyne
BBC News, Tehran
To an outside observer, a row on Zionism and Israel in Iran has the arcane feel of a medieval theological dispute.
Ahmadinejad is due to visit New York for the UN General Assembly meeting
Indeed, if the topic was not so serious, it could almost be the subject for one of the more bizarre Monty Python comedy sketches.
Senior figures across Iran have been lining up as if for a contest - to prove quite how strongly opposed they are to Israel and Zionism.
In official circles in the Islamic Republic of Iran, it is, of course, accepted beyond dispute that Zionism is evil, possibly even the source of all evil in the world.
Today, Iran is friends with the American and Israeli people. No nation in the world is our enemy
Esfandiar Rahim Mashae
President Mahmoud Ahmadinejad has been particularly outspoken in his comments on the matter.
His remark that Israel should be "wiped off the face of the map" was one of the first signs that his was going to be a most controversial presidency - even if the precise translation of those comments is still disputed.
So the most bizarre element in this episode is that it is a close ally of the president who has been accused of being too friendly to the Jewish state, or at least to its citizens.
In an interview in July, the vice president in charge of tourism, Esfandiar Rahim Mashaei, was quoted as saying that Iranians were friends with the Israeli people, despite the conflict between their governments.
"Today, Iran is friends with the American and Israeli people," he said, according to the semi-official Fars News Agency. "No nation in the world is our enemy."
It sounded just like the standard cliche from the US state department: "We are not enemies with the people of country x, just their leaders."
Ayatollah Khamenei made it clear he had no sympathy for the Israelis
But in Iran, in the present climate, even the slightest hint that everything about Israel is not pure evil unleashed a storm of protest, with sermons, newspaper editorials, complaints in parliament and demonstrations.
Yet the vice president refused to back down.
The controversy dominated a news conference given last Thursday by President Ahmadinejad - provoking numerous questions, and taking up more than half-an-hour of the proceedings.
The president supported his deputy's comments, while making one of his strongest tirades to date against the 'leaders of Zionism'.
Mr Ahmadinejad said that a handful - only around 2000 Zionists - dominated the centres of power in the West. They were atheists, he said, who wanted to dominate the world and plunder the wealth of nations.
And Mr Ahmadinejad argued that that many of those now living in Israel had been duped into moving to the country by that handful of Zionists. It was time to open the gates to let them return home.
He had sympathy for them, he explained, just as he had compassion even for US President George W Bush, who could have been a better person, despite his countless crimes.
But despite the tough rhetoric against Israel, there was a quick rebuke from the Supreme leader, Ayatollah Khamenei.
Speaking at last Friday's prayers, the ayatollah made it clear he had no sympathy for the Israeli people.
"Who are the Israelis," he said. "They are responsible for usurping houses, territory, farmlands and businesses. They are fighters at the disposal of Zionist operatives.
"A Muslim nation cannot remain indifferent to such people who are stooges at the service of the arch-enemies of the Muslim world," the ayatollah said.
Mr Mashaei immediately declared his loyalty to the supreme leader, but still did not retract his comments.
And there is plenty of evidence that the vice president spoke with the approval, perhaps even the encouragement, of President Ahmadinejad.
The two men have been close friends since they served together in the Revolutionary Guards. They are even related - Mr Mashaei's daughter is married to Mr Ahmadinejad's son - one of many dynastic marriages in Iran.
Journalist Ali Pahlavan says it is quite possible that Mr Mashaei is being used as a mouthpiece for the president, enabling Mr Ahmadinejad to qualify his controversial comments about wiping Israel off the map.
Iran insists that its nuclear programme is for peaceful purposes
"He is trying to enhance and enlighten and broaden the idea of a world without Israel," Mr Pahlavan explained.
To show, in other words, that Iran's intention is not to wipe out the Israeli people in some new act of genocide, but just to see the end of the state of Israel, just as the Soviet Union disintegrated.
There has even been speculation that this might be the prelude to a peace overture from President Ahmadinejad to the United States.
It is an intriguing idea, just as Mr Ahmadinejad arrives in New York for his annual visit to the UN General Assembly. What better opportunity for some ground-breaking diplomacy?
Certainly, Mr Ahmadinejad is a believer that Iran's best policy lies in negotiating directly with the "great Satan" - by contrast with others in the country, who believe their best hope is in using Europe as an intermediary.
But if this is a peace initiative, it is deeply misguided - even by the strange standards of Mr Ahmadinejad's government.
To accuse your negotiating partner of being in the hands of a few evil atheist Zionists is hardly the best way to encourage constructive talks.
And there is absolutely also no sign that Tehran is willing to compromise on the more substantive issue on their agenda - Iran's nuclear programme.
More likely, this seems to be an internal argument within Iranian ruling circles, a sort of theological refinement of exactly where the limits lie to the anti-Zionism that the country uses to help define its very raison d'etre.