TEHRAN, Iran (AP) -- Iran's interior ministry said Saturday President Mahmoud Ahmadinejad had a commanding lead after 61 percent of all votes were tallied, but his pro-reform rival countered that he was the clear victor and warned of possible fraud in the election.
The dispute rose up even before polls closed Friday night, heightening tensions across the capital where emotions have been running at a fever pitch. Mir Hossein Mousavi, the reformist candidate, suggested he might challenge the results.
The messy and tense outcome capped a long day of voting - extended for six hours to accommodate a huge turnout. It raised worries that Iran's Islamic establishment could use its vast powers to pressure backers of Mousavi.
During the voting, text messages were blocked - a key campaign tool for reformers - as well as some pro-Mousavi Web sites. Security officials warned they would not tolerate political gatherings or rallies before the final results were known.
Even before the first vote counts were released, Mousavi held a news conference to declare himself "definitely the winner" based on "all indications from all over Iran." But he gave nothing more to back up his claim and alleged widespread voting irregularities without giving specifics - suggesting he was ready to challenge the final results.
Moments after Mousavi spoke, however, Iran's state news agency reported that Ahmadinejad was the victor. The report by the Islamic Republic News Agency also gave no details.
With more than 20 million votes counted, Ahmadinejad had 66.1 percent and Mousavi had 31.6 percent, said Kamran Daneshjoo, a senior officials with the Interior Ministry, which oversees the voting.
It was not reported whether the results were from locations considered Ahmadinejad strongholds or where Mousavi hoped to make headway.
Based on figures released by the ministry, around 75 percent of the 46.2 million eligible voters went to the polls.
During the voting, some communications across Iran were disrupted - Internet connections slowed dramatically in some spots, affecting the operations of news organizations including The Associated Press, and some pro-Mousavi Web sites were blocked. It was not clear what had caused the disruptions.
A high turnout was expected to help Mousavi, who is counting on an outpouring from what's been called his "green tsunami" - the signature color of his campaign and the new banner for reformists seeking wider liberties at home and a gentler face for Iran abroad.
The president does not have the power to direct high-level policies, which are dictated solely by the ruling clerics. But the election focused on what the office can influence: boosting Iran's sinking economy, pressing for greater media and political freedoms, and being Iran's main envoy to the world.
Voters streamed to polling sites from the early morning until midnight - with balloting extended by at least four hours. Some waited for hours in temperatures that hit 113 degrees in Iran's central desert or in nighttime downpours that lashed many parts of the country. In Tehran, a bride in her wedding gown cast her ballot. Families making traditional Friday visits to relatives' graves filed into polling stations in the capital's sprawling cemetery.
Results are expected Saturday. But worries about the volatile atmosphere were already clear. The Interior Ministry - which oversees voting - said all rallies or political gatherings would be banned until after the formal announcement of results.
"Ultimately the election is for the Iranians to decide," said Obama, who has offered to open dialogue with Iran's leaders after a nearly 30-year diplomatic freeze. "But ... you're seeing people looking at new possibilities. And whoever ends up winning the election in Iran, the fact that there's been a robust debate hopefully will help advance our ability to engage them in new ways."
There were sporadic claims by Mousavi's aides of voting irregularities, including ballots running out in some provincial sites, but they could not be independently verified. About a dozen Ahmadinejad supporters pelted a Mousavi office in Tehran with tear gas canisters, but no one was injured, said Saeed Shariati, head of Mousavi's Web campaign. The attack could not be independently confirmed.
In a possible complication for Mousavi's backers, Iran's mobile phone text messaging system was down. Many Iranians, especially young voters, frequently use text messages to spread election information quickly to friends and family.
Only weeks ago, Ahmadinejad (Ah-mad-in-A-jad) seemed ready to coast to re-election with the reformist ranks in disarray. But Mousavi's bid began to gain traction with young voters with his Web outreach and hip "green" rallies. Suddenly, the 67-year-old Mousavi (Mou-sa-VI), who served as prime minister in the 1980s, became the surprise hero of a powerful youth-driven movement.
"I hope to defeat Ahmadinejad today," said Mahnaz Mottaghi, 23, after casting her ballot at a mosque in central Tehran.
Outside the same polling station, 29-year-old Abbas Rezai said he, his wife and his sister-in-law all voted for Ahmadinejad.
"We will have him as a president for another term, for sure," he said.
The highly charged campaign brought blistering recriminations against Ahmadinejad - whom Mousavi said was moving Iran to a "dictatorship" - and a stunning warning from the ruling establishment. The political chief of the powerful Revolutionary Guard warned Wednesday it would crush any "revolution" against the Islamic system by Mousavi's "green movement."
The outcome, however, will not sharply alter Iran's main policies or sway major decisions, such as possible talks with Washington. Those crucial issues rest with the ruling clerics headed by the unelected Supreme Leader Ayatollah Ali Khamenei.
But Mousavi has offered hopes of more freedoms at home. If elected, he could try to end crackdowns on liberal media and bloggers and push for Iran to embrace Obama's offer of dialogue. He favors talks with world powers over Iran's nuclear program, which the United States and others fear is aimed at making weapons. Iran says it only seeks reactors for electricity.
Iranians around the world also took part in the vote. In Dubai, home to an estimated 200,000 Iranians, the streets around the polling station at the Iranian consulate were jammed with voters overwhelmingly favoring Mousavi.
"He is our Obama," said Maliki Zadehamid, a 39-year-old exporter.
In southern California and elsewhere in the U.S., Iranian expatriates and their children gathered at voting sites set up in hotels and mosques and staffed by volunteers. Many said they were voting for Mousavi.
Shahab Baniadam, 51, said he had been in the United States for 30 years and was voting in an Iranian election for the first time, casting his ballot for Mousavi because he "seems like a reasonable person."
A top election official predicted turnout could surpass the nearly 80 percent in the election 12 years ago that brought President Mohammad Khatami to power and began the pro-reform movement. Mousavi is counting on under-30s, who account for about a third of Iran's 46.2 million eligible voters.
In Tehran's affluent northern districts - which strongly back Mousavi - voters waited for up to an hour to cast ballots. Mahdi Hosseini, a university student, sharply criticized Ahmadinejad for "degrading Iran's image in the eyes of the world."
Ahmadinejad brought international condemnation by repeatedly questioning the Holocaust.
In the conservative city of Qom, home to seminaries and shrines, hundreds of clerics and women dressed in long black robes waited to vote in a long line outside a mosque. Ahmadinejad's campaign has heavily courted his base of working-class families and tradition-minded voters with promises of more government aid and resistance to Western pressures over Iran's nuclear ambitions.
Mousavi hammered Ahmadinejad for mismanaging the economy, burdened by double-digit inflation and chronic unemployment despite vast oil and gas riches.
For the first time in Iran, the forces of the Web were fully harnessed in an election showdown. That catapulted Mousavi into political star.
On Friday, dozens of Iranians using Twitter posted messages including one that proclaimed: "For Iran, this is the Day of Decision."
Mousavi's stunning rise also has been helped by his popular and charismatic wife, former university dean Zahra Rahnavard, and their joint calls for more rights and political clout for women. Iranian women work in nearly all levels of society - including as parliament members. But they face legal restrictions on issues such as inheritance and court testimony, where their say is considered only half as credible as a man's.
Iran's elections are considered generally fair, but the country does not allow international monitors. The ruling clerics, however, put their stamp on the elections from the very beginning by deciding who can run. More than 470 people sought to join the presidential race, but only Ahmadinejad and three rivals were cleared.
During the 2005 election, there were some allegations of vote rigging from losers, but the claims were never investigated.
After casting his vote in the white ballot box, the Supreme Leader Khamenei urged Iranians to remain calm.
"As far as I see and hear, passion and motivation is very high among people," Khamenei told reporters. "If some intend to create tension, this will harm people."
In the southern city of Shiraz, people waited for hours to vote at the Shahchragh shrine, the burial site of a Shiite saint.
In the southeastern city of Zahedan - where a bomb blamed on Sunni militants killed at least 25 people at a Shiite mosque last month - there were no reports of tensions. The bombed mosque was used as a polling station.
The race will go to a runoff on June 19 if no candidate receives a simple majority of more than 50 percent of the votes cast. Much depends on how many votes are siphoned off by the two other candidates: conservative former Revolutionary Guard commander Mohsen Rezaei and moderate former parliament speaker Mahdi Karroubi.