With more than 80% of results in, the commission said he won 63% support in an election marked by high turnout.
Reformist Mir Hossein Mousavi also claimed victory, calling the result a "dangerous charade", as supporters vowed to appeal for a re-run.
Police have sealed off Mr Mousavi's campaign HQ, preventing his supporters from holding a news conference.
One opposition newspaper has been closed down and BBC websites also appear to have been blocked by the Iranian authorities.
Ahmadinejad challenger, Mousavi, claims fraud, stating "I personally strongly protest the many obvious violations and I'm warning I will not surrender to this dangerous charade.
The result of such performance by some officials will jeopardize the pillars of the Islamic Republic and will establish tyranny"
The BBC's Jon Leyne, in Tehran, says the result has been greeted with surprise and with deep scepticism by many Iranians.
The figures, if they are to be believed, show Mr Ahmedinejad winning strongly even in the heartland of Mr Mousavi, the main opposition contender.
The scale of Mr Ahmadinejad's win means that many people who voted for a reformist candidate in the previous presidential election four years ago have apparently switched their votes to Mr Ahmadinejad, he adds.
More from Reuters.
Via SFGate on the "so-called Obama effect":
Analysts suggested that President Obama's rhetoric of extending an open hand to old rivals, culminating in his widely watched speech to the Islamic world from Egypt on June 4, may have pushed reform-minded voters to the polls in Iran. A similar claim was made after Lebanon's recent election, which was seen by some analysts as a repudiation of Iran's proxy Hezbollah.
Obama, in comments Friday, said he was hoping for such an outcome.
After his speech in Cairo, he said, "We tried to send a clear message that we think there is the possibility of change. Ultimately, the election is for the Iranians to decide, but just as has been true in Lebanon, what can be true in Iran is that you're seeing people looking at new possibilities."
Some well thought out analysis from PoliGazette:
Now, I understand the incumbency factor in elections is usually strong, in the U.S. at least. That’s why incumbent politicians nearly always get re-elected, unless there’ve made some massive screwup, or a prominent figure in their party has become very unpopular. However, and maybe this is showing my naivety of Iranian politics, but 65% is massive. The only explanations for such a lead are: 1) Ahmadinejad is more popular than widely believed in the West, 2) A lot of people have stayed home, or 3) It’s been rigged. You simply don’t see these kinds of numbers in any functioning democracy. For which Iran, considering its theocratic nature, “functioning democracy” is a matter of question, not fact.
If you take the numbers provided by the state media as gospel, it makes you wonder exactly what’s going on in Iran. I don’t believe for a second that Ahmadinejad is as popular as he was in 2005. His country is in economic turmoil, with oil profits having plummeted with the onset of all the trouble. We’ve seen what’s happened in the U.S. and Europe, where liberal and conservative politicans respectively have swept elections all across the board. At least partially this is due to voters blaming the “other guy” (or gal). All that in countries that don’t base most of their economies off an increasingly scarce natural resource. The idea that Ahmadinejad could have gone from weathering criticism from his constituents over dropping oil revenues and thus dropping economic conditions, only to pull off a landslide, is absurd.
To my mind, that leaves only options 2 and 3. Yet, and again I can only go on the official word (which might be disputable), 70% of voters have turned out. Keep in mind that this is more voters than turned out for the U.S. elections in November, which was about 62%. So, the idea that a lot of voters protested the election is also absurd, assuming the official numbers are true. Normally I might say that demographics might affect the vote. For example if younger voters (a key Moussavi group) failed to get out, that would turn the election in Ahmadinejad’s favor, but reports I’ve read indicate this also isn’t the case. So either the reports are wrong, or the youth support for Moussavi wasn’t that strong.
We find ourselves at the last option. .............
More as news comes out, but because there is no transparency in Iran, we may never know if the vote count is legitimate or not.
It looks like Ahmadinejad will remain president.