TEHRAN, Iran - President Mahmoud Ahmadinejad declared a "new beginning" for Iran late yesterday after he was declared victor in the presidential election, but as he spoke on national television violent demonstrations rolled through several areas of the capital.

Supporters of defeated candidate Mir Hossein Mousavi burned trash bins, threw stones, and clashed with police in the worst rioting in Tehran in many years.

The Interior Ministry, controlled by Ahmadinejad, announced that he had been elected in the first round with 62.6 percent of the vote, compared with less than 34 percent for Mousavi, the leading challenger. Turnout was a record 86 percent of the 46.2 million eligible voters.

Announcement of the results triggered protests throughout the day. Families lined the streets in the middle-class neighborhood of Saadat Abad, cheering on the demonstration and shouting: "Death to the dictator!"

Mousavi's whereabouts were unknown. Reporters on their way to a news conference by the former candidate were stopped by security personnel who said the meeting had been canceled. Several journalists were beaten.

In his speech from the garden of the presidential palace, Ahmadinejad, who campaigned as a champion of the working class, lauded the high turnout in the voting, which he described as free and fair.

"There were two options," he said. "Either to return to the old days or continue our leap forward toward high peaks . . . and progress. Fortunately, the people voted for that last option."

He said the Iranian people had chosen a program over a personality, and he promised to continue his policies, "only with more energy." He also attacked foreign media coverage of the campaign, saying "they have launched the heaviest propaganda and psychological war against the Iranian nation."

Mousavi, who had claimed on Friday that he won, posted a statement on his Web site rejecting the vote tally as rigged.

"I'm warning that I won't surrender to this manipulation," he said. "The outcome of what we've seen from the performance of officials . . . is nothing but shaking the pillars of the Islamic Republic of Iran's sacred system and governance of lies and dictatorship."

He warned that "people won't respect those who take power through fraud," and the headline on the Web site declared, "I won't give in to this dangerous manipulation," the Associated Press reported.

Mousavi appealed to Iran's supreme leader, Ayatollah Ali Khamenei, to intervene. But Khamenei had already issued a televised statement that declared Ahmadinejad the victor and appealed to Iranians and the defeated candidates to support the president.

Khamenei's statement made it unlikely the election results would be overturned.

Past Iranian elections were considered generally fair. In 2005, when Ahmadinejad was first elected, the losing candidates claimed irregularities at the polls, but the charges were never investigated.

"The majority of Iranians are certain that the fraud is widespread," said analyst Saeed Leilaz in Tehran. "It's like taking 10 million votes away from Mousavi and giving them to Ahmadinejad."

Whether this is enough to spawn a sustained opposition movement remains an open question.

Much depends on how much the opposition is willing to risk. The heartland of Iran's liberal ranks is the educated and relatively affluent districts of north Tehran. It's also the showcase for the gains in social freedoms that began with the election of President Mohammad Khatami in 1997: makeup, Internet cafes, head scarves that barely cover hair, and satellite dishes that are technically illegal but common.

The ruling clerics tolerate all that to a point - part of a tacit arrangement that the liberties stay as long as reformists remain politically meek. A real protest movement could threaten their coveted Western-looking lifestyle and risk a brutal response from groups vowing to defend the Islamic system.

In his address, Ahmadinejad criticized his opponents, particularly the influential clerics and former officials behind Mousavi who have ties to the 1979 Islamic revolution. He said it did not matter what they had done at the time of the revolution. "It matters what they do now," he insisted, suggesting that his opponents were not working for the people.

Tensions enveloped Tehran early yesterday after Ahmadinejad had been declared the victor. Youths, families, and young women in traditional black chadors gathered around the heavily fortified Interior Ministry, where the votes had been counted.

Fights erupted in several locations across Tehran soon after Khamenei's televised statement.

On Mottahari Street, protesters set three buses on fire. Riot police appeared in full protective clothing and helmets, wielding batons as they raced through the streets in two-man teams on red motorcycles. Others stood in lines amid three burned city buses.

Hundreds of protesters rained stones at the police. Thick black smoke filled the air. Loud thuds could be heard in the distance.

"We want freedom!" protesters shouted. Many of them covered their faces with green cloth, the color of their candidate, Mousavi. About a dozen ran after someone they thought was an undercover policeman. Dressed in a checkered shirt, wearing a backpack, he had stood between the mostly younger protesters, trying to film them.

"You are without honor!" two girls covered in traditional chadors shouted at police.

In other locations, demonstrators threw policemen to the ground, who were beaten and kicked by bystanders. "They have insulted us with this result," said Mehrdad, a student who refused to give his family name. "We want Mousavi," the men around him said.

"Commando troops are beating the people. I even saw they beat an old lady," said Morteza Alviri, a former major from Tehran, now a campaign official for Mehdi Karroubi, a former candidate. He was trapped in his car by the protests and spoke by phone.

The demonstrations continued into last night, with riot police receiving support from Iran's voluntary paramilitary force, the baseej.

Ahmad Zeidabadi, a political dissident, was arrested yesterday evening, his wife, Mandieh Mohammadi, confirmed. There were reports that 11 other prominent opponents were also arrested. Mobile-telephone services were cut, and social-network sites Facebook and Twitter were filtered. Internet connections as a whole were down part of yesterday. Iranian media remained silent on the riots. State television showed voters saying it was time to move forward and accept the result.

Mousavi was not seen yesterday. In the afternoon, Ali Reza Adeli, a senior official in Mousavi's campaign, denied reports that his candidate was under house arrest. Zahra Rahnavard, Mousavi's wife, told the BBC by phone that she and her husband would continue to fight for the "rights of Iranian voters."

Ahmadinejad announced a victory party for today at a central square that Mousavi supporters had used in recent weeks to stage their election rallies.

"We are hopeful," the president said during his speech. "Now it's time to move on and continue to build our great Iran."

This article contains information from the Associated Press.