Iran is now a regional superpower, and ever since the Islamic revolution in 1978-9, we in the West have consistently misunderstood it.
Ayatollah Khomeini died in 1989
On 9 January 1979, a couple of weeks before his triumphant return to Iran, I interviewed Ayatollah Khomeini at his base in exile outside Paris.
In the interview, Khomeini sketched out Iran's entire future: the eradication of the monarchy, universal suffrage and the ban on "corrupt" Western influences.
And he outlined his attitude to Western countries like Britain and the US.
"We intend to reject a relationship which makes us dependent on other countries," he said.
"We have bitter memories of the British, because they ensured that Reza Shah (the last Shah's father) came to power, and for half a century we have been under the domination of this man and his son."
For almost 30 years, the West has concentrated on the religious, fundamentalist aspect of Iran's Islamic Republic.
The overthrow of Saddam Hussein by the US has swept Iran's local rival off the chessboard
We have forgotten that Khomeini's revolution was also a declaration of independence from British and American control.
Now, thanks to several different factors, Iran has suddenly reached a new level of power and influence.
The sky-rocketing price of oil has put a lot of money into its pocket.
The overthrow of Saddam Hussein by the US has swept Iran's local rival off the chessboard, and free elections in Iraq have brought the Shia majority to power.
Iraq, weakened by the immense violence which has followed Saddam's overthrow, now regards Shia Iran as the dominant partner in the relationship.
Finally, after eight years of ineffectual government by the moderate reformist President Mohammed Khatami, Iran suddenly has an loud, idiosyncratic, fundamentalist president who cannot be ignored.
Mahmoud Ahmadinejad has gone back to Ayatollah Khomeini's principles, and he wants to establish Iran's independence further by turning Iran into a nuclear power.
Relations with Israel
The US and Israel are seriously worried.
If President Ahmadinejad wants to attack Israel, there are simpler ways than building a nuclear bomb
President Ahmadinejad insists that Iran is simply setting up a civil nuclear power industry, and that the US has no right to stop it.
But the American-based scholar Vali Nasr, author of The Shia Revival, believes he plans to go further: "He really wants to be one screwdriver short of a nuclear weapon," he said.
Israel's justice minister, Meir Sheetrit, is certain that Iran plans to build a nuclear bomb.
"They are fighting against the free world," he says, "and I'm warning not only Israel but all Europe and all democratic countries. Otherwise it could be too late."
But, if President Ahmadinejad wants to attack Israel, there are simpler ways than building a nuclear bomb.
Iran's close ally, the Lebanese Shia movement Hezbollah, armed and trained by Iran, launched a highly successful brief war against Israel.
A guerrilla movement, well supplied with low-tech weapons, out-fought and outmanoeuvred a big conventional army using tanks, planes and artillery.
By encouraging and arming Hezbollah, Iran has managed to create an anti-American front between Shia and Sunni Muslims in many parts of the Middle East.
Instead of the old Sunni-Shia hostility, there is a new unity.
Nowadays, you can see pictures of Hezbollah's leader, Hassan Nasrallah, in shops and streets and houses from Cairo to Amman to Jerusalem.
According to Prince Hassan of Jordan: "The populism of Ahmadinejad and Hezbollah is an alternative to civil society in the Middle East.
"By recruiting the poor and disenfranchised, they are closer to people's needs than governments are. Which is why they have this enormous following."
Pro-Western governments in the Middle East may not like it, but there is nothing they can do.
American influence in the area is visibly declining.
Their own positions are distinctly weaker.
President Ahmadinejad has put Iran at the forefront of all these changes.
For him, it is all part of the same process that Ayatollah Khomeini started, 27 years ago, when he overthrew the American- and British-imposed Shah.
Iran and Her Neighbours was broadcast on Wednesday, 20 September, 2006 at 1100 BST on Radio 4.