The Iranian election commission said President Ahmadinejad had won 18.
8m votes out of 28.
9m votes counted so far.
This is compared with just 9.
3m votes for the moderate opposition leader Mirhossein Mousavi.
Official estimates of a maximum 80% turnout out of 46.
2m eligible voters mean Mr Mousavi could not close the gap even if he were to win all remaining votes.
As Mr Ahmadinejad's campaign manager claimed victory, the president's supporters poured onto the streets of Tehran.
Sandwich seller Kamra Mohammadi, 22, said: "I am happy that my candidate has won - he helps the poor and he catches the thieves.
" Sky's foreign affairs editor Tim Marshall said the opposition party was claiming there had been voter irregularities.
He said opposition newspapers had appeared this morning with "large gaps where articles had been blanked out", suggesting stories about the voting claims had been removed.
Mr Mousavi also claimed he had won the presidential race.
He told a news conference: "In line with the information we have received, I am the winner of this election by a substantial margin.
" Mr Mousav had been aiming for a comeback on a groundswell of support among the nation's youth.
But the opposition leader also complained of irregularities in the vote, including a shortage of ballot papers and attacks on his campaign offices.