TEHRAN - Hardline President Mahmoud Ahmadinejad resoundingly won Iran's election, preliminary official results showed on Saturday, but his moderate challenger alleged irregularities and claimed victory for himself.

The level of the incumbent's support, roughly twice as many votes as former Prime Minister Mirhossein Mousavi with most ballots counted, confounded analyst predictions of a tight race.

A bitterly fought campaign generated intense excitement inside Iran and strong interest around the world, with policymakers looking for signs of a change in Tehran's approach in a long-running row with the West over its nuclear ambitions.

Listing several complaints before official results were announced, Mousavi said many people had not been able to vote and that there had been a lack of ballot papers.

He also accused authorities of blocking text messaging, with which his campaign tried to reach young, urban voters.

I am the definite winner of this presidential election, Mousavi told a news conference.

But the Islamic Republic's election commission said Ahmadinejad was ahead with 64.8 percent of the votes from Friday's presidential election in the world's fifth biggest oil exporter after more than 30 million ballots had been counted.

Mousavi had around 32 percent support, said the commission. Based on an Interior Ministry estimate of a maximum 80 percent turnout of Iran's 46 million eligible voters, he could not beat Ahmadinejad with the votes still to be counted.

The official news agency IRNA said: Dr Ahmadinejad, by winning most votes ... has secured his victory. State media said final results would be announced at 10 a.m. (1:30 a.m. EDT).

Trita Parsi, president of the Washington-based National Iranian American Council, expressed disbelief at the wide margin in Ahmadinejad's favor.

It is difficult to feel comfortable that this occurred without any cheating, Parsi said.

Speaking in Washington before the results were released, U.S. President Barack Obama said his administration was excited about the debate taking place in Iran and he hoped it would help the two countries to engage in new ways.

STREET SCUFFLES

Western capitals had hoped a victory for Mousavi could help ease tensions with the West, which is concerned about Tehran's nuclear plans, and improve chances of engagement with Obama, who has talked about a new start in ties with Tehran.

Now they will have to find a way to deal with Ahmadinejad's government if they want to make progress in defusing the dispute over Iran's nuclear programme.

The three-week election campaign was marked by mudslinging, with Ahmadinejad accusing his rivals of corruption. They said he was lying about the state of the economy.

It was unclear how Mousavi's supporters, who thronged the streets of Tehran nightly in the run-up to Friday's vote, might react to an Ahmadinejad victory. U.S. strategic intelligence group Stratfor called the situation potentially explosive, with a considerable risk of unrest.

Scuffles broke out early on Saturday between police and chanting Mousavi supporters in a Tehran square, a Reuters witness said. Police say they have increased security across the capital to prevent any trouble. All gatherings have been banned until the publication of final results.

Shortly before voting ended, some Tehran residents said they were unable to make international phone calls and some Internet servers went down.

Ahmadinejad draws his bedrock support from rural areas or poorer big city neighborhoods. Mousavi enjoys strong backing in wealthier urban centers, and was expected to attract votes from women and young Iranians.

Two other candidates attracted only tiny voter support.

Long queues had formed at voting centers, after a heated campaign in which inflation -- officially around 15 percent -- and high unemployment were leading issues.

Ahmadinejad, 52, won power four years ago on a pledge to revive the values of the 1979 Islamic revolution. He has steadily built up Iran's nuclear programme, rejecting Western charges that it is aimed at building an atomic bomb, and stirred international outrage by denying the Holocaust and calling for Israel to be wiped from the map.

Mousavi, 67, rejects Western demands that Iran halt uranium enrichment but analysts say he would have brought a different approach to Iran-U.S. ties and talks on the nuclear issue. Ultimately, however, nuclear and foreign policy are determined by the country's supreme leader, Ayatollah Ali Khamenei.

The United States has had no ties with Iran since shortly after the revolution but Obama said in Washington the United States had tried to send a clear message that we think there is the possibility of change in relations.

(Additional reporting by Hossein Jaseb, Hashem Kalantari, Zahra Hosseinian; Writing by Dominic Evans; Editing by Ralph Gowling)