Calls had been mounting for Mr Khatami to put forward his name
Iran's former president Mohammad Khatami has ended months of speculation by announcing that he will run in June's presidential election.
Mr Khatami was president of Iran from 1997-2005 and was succeeded by Mahmoud Ahmadinejad, a conservative.
"I will seriously take part as a candidate for the election," he told a meeting of a pro-reform group.
In January, a close aide to Mr Ahmadinejad said the incumbent would, as expected, stand for re-election.
Served as Iranian president from 1997-2005
Born 1943, the son of a respected ayatollah in Yazd Province
Regarded as a reformist
Mr Khatami, the most liberal president since the revolution, should have a good chance of unseating Mr Ahmadinejad, arguably the most conservative leader in that time, says the BBC's Jon Leyne, in Tehran.
However, he will face tough opposition from hardliners in the clergy and military, our correspondent adds.
Mr Khatami urged a free election, saying the fate of the Islamic Revolution was at stake.
"Is it possible to remain indifferent toward the revolution's fate and shy away from running in the elections?" he asked at a news conference in Tehran.
"I consider this as a right to run in this stage. This candidacy doesn't deprive others and the path is open. What should be stressed is that the elections must be held freely."
'Desire for change'
It should prove an intriguing contest in June, our correspondent says.
Mahmoud Ahmadinejad has been a controversial figure
In this 30th anniversary year of the revolution, it will give Iranians a stark choice over the future of the Islamic Republic.
One other obstacle for Mr Khatami, Jon Leyne adds, is that his old supporters were disillusioned by his failure to push through more changes when he was in power.
Therefore, the challenge will be persuading them to go out and vote.
Mohammad Ali Abtahi, a close aide of Mr Khatami, warned that the results of elections in Iran were always of "serious concern" - an apparent reference to vote-rigging.
"But if the voter participation is high, we can easily win the election," he told AFP news agency.