His challenger, Mir Hossein Mousavi, is claiming irregularities. Police moved quickly to quell small protests.
Results of 47.3 percent of the vote, announced at 2 a.m., gave Mr. Ahmadinejad 67 percent of the vote, compared with 30.34 percent for Mir Hossein Mousavi, whose "green wave" of supporters had sparked popular street demonstrations during the campaign.
Mr. Mousavi argued that he had won an outright victory. "In line with the information we have received, I am the winner of this election by a substantial margin," he stated late on Friday.
Mousavi asked Iran's supreme religious leader, Ayatollah Sayed Ali Khamenei, to intervene.
At least three pro-Mousavi websites were shut down on Friday – along with that of the candidate himself. The results came through uncommonly quickly overnight, far faster than all elections of previous years.
In a statement Friday night on Fars news agency, Ahmadinejad's campaign said that "a golden page in the glorious history of the Islamic revolution has been witnessed." It praised the Iranian people for showing that while "reaching toward justice and fighting oppression, they will not stand down, and they will go against any darkness and filth."
Tears and anger on the street