BEIRUT, Lebanon — Tens of thousands of protesters chanted and carried banners through the heart of Tehran and other Iranian cities on Friday, hijacking a government-organized anti-Israel march and injecting new life into the country’s opposition movement.
The protests, held in defiance of warnings from the clerical and military elite, served as a public embarrassment to President Mahmoud Ahmadinejad, who had hoped to showcase national unity just two weeks before he is set to meet Western leaders for talks on Iran’s nuclear program.
He used the annual rally for Jerusalem Day, also known as Quds Day, to deliver a fiery anti-Israeli speech in which he called the Holocaust “a lie” and impugned the West again for its criticisms of Iran’s disputed June 12 presidential election.
But his efforts to recapture the stage were largely drowned out by a tumultuous day of street rallies, in which the three main opposition leaders marched with their followers for the first time in months. Flouting the official government message of support for Palestinian militants, they chanted, “No to Gaza and Lebanon, I will give my life for Iran.”
Coming a day after President Obama announced a revised missile defense system that aims to check Iran’s military ambitions, the rallies underscored the continuing vitality of the domestic opposition movement, which has rejected the election as fraudulent and fiercely criticized the violence that followed it.
In a striking contrast with earlier rallies, the police often stood on the sidelines as protesters faced off against huge crowds of government supporters — many of them bused in from outside the cities — and chain-wielding Basij militia members. There were reports of arrests in Tehran and the southern city of Shiraz, but no shootings or deaths, with the police apparently showing greater restraint than during earlier protests.
The protesters, ignoring stern official warnings not to use the annual pro-Palestinian rally as a pretext for demonstrations, showed up in large numbers wearing the trademark bright green color of the opposition.
When government men shouted “Death to Israel” through loudspeakers, protesters derisively chanted “Death to Russia” in response. Many opposition supporters are angry about Russia’s quick acceptance of Mr. Ahmadinejad’s electoral victory.
The three opposition leaders, Mir Hussein Moussavi, Mehdi Karroubi and Mohammad Khatami, joined the crowds in Tehran for the first time in months, drawing cheers.
Later, Basij militia members tried to attack Mr. Khatami and Mr. Karroubi, but defenders pushed them back, opposition Web sites reported.
The government had largely halted street protests in July, with a harsh government crackdown that left dozens of marchers dead and thousands in jail. But the authorities have been unable to silence the opposition’s leaders, who have kept up their criticism of the election and the government’s violent response.
The opposition leaders raised tensions when they leveled accusations that some protesters were tortured and raped in prison. The rape accusations have been especially embarrassing for the government, which has denied them while acknowledging that some prisoners were tortured.
There were reports of similar demonstrations and clashes in other cities Friday, including Isfahan, Tabriz, Yazd and Shiraz, where protesters skirmished with Basij militiamen, and freed a group of fellow protesters who were being arrested, opposition Web sites reported.
In the capital, the police and huge crowds of government supporters blocked most protesters from approaching Mr. Ahmadinejad as he arrived in a bulletproof car at Tehran University to deliver a speech before the formal Friday Prayer sermon. But as he began his remarks, chants of “Resign! Resign!” could be heard, according to witnesses cited on opposition Web sites.
Mr. Ahmadinejad said that confrontation with Israel was a “national and religious duty” and that the Holocaust was “a lie” that was used as a pretext for the country’s creation in 1948. Although he has called the Holocaust a “myth” in the past, provoking angry reactions in the West, he has rarely if ever used the word “lie” in public speeches.
The White House responded sharply to the remarks about the Holocaust. “We’ve heard that type of rhetoric before,” the president’s press secretary, Robert Gibbs, told reporters. “Obviously, we condemn what he said.”
The United States ambassador to the United Nations, Susan E. Rice, said Friday that Mr. Obama would not meet with Mr. Ahmadinejad next week when world leaders gather in New York for the United Nations General Assembly meeting.
Mr. Obama, in a major national security reversal, scuttled his predecessor’s missile-shield plan to focus instead on protecting Israel and Europe against short- and medium-range Iranian missiles. Mr. Ahmadinejad made no mention of that in his speech, nor has his government responded.
Both the revised missile plan and Mr. Ahmadinejad’s anti-Israel rhetoric are likely to elevate the tensions surrounding his visit to the United Nations.
As Jerusalem Day approached, a number of conservative figures, including Iran’s supreme leader, Ayatollah Ali Khamenei, warned that the day should not become an occasion for domestic discontent. On Thursday, the Revolutionary Guards issued an especially fierce statement, declaring that all protesters would be treated as Israeli spies.
But the government appears to have treated Friday’s protests with relative leniency. Although tear gas was fired at some crowds in central Tehran — it was not clear by whom — there was no renewal of the fierce crackdown that took place in June and July.
Although the marchers celebrating Jerusalem Day generally outnumbered the protesters, there were parts of the city where the opposite was true. Often, the protesters slyly distorted the traditional rallying cries of the pro-government crowds. When the marchers chanted, “The blood in our veins is a gift to our leader,” protesters countered with, “The blood in our veins is a gift to our nation.”
At one point thousands of protesters chanting “death to the dictator” as they walked down Valiasr Street, the broad avenue that runs across much of Tehran, collided with an equally large crowd of pro-government marchers chanting slogans against Israel, the United States and Britain.
A standoff ensued. Police officers standing nearby refused to take sides, and in some cases even stepped in to break up fights. Finally, several trucks full of government supporters arrived, and the protesters began withdrawing.
Iranian state television ignored the protests, showing thousands of marchers clad in checked Palestinian-style scarves, carrying posters of Hassan Nasrallah, the leader of the Lebanese militant group Hezbollah. Jerusalem Day, held on the last Friday of the fasting month of Ramadan, is an important occasion for the government, which uses its support for Palestinian militants and the Lebanese Hezbollah to burnish its street support in an Arab world that is largely hostile to Iran.