Hard-liners attacked senior pro-reform leaders in the streets as tens of thousands marched in competing mass demonstrations by the opposition and government supporters.
Opposition protesters, "chanting death to the dictator," hurled stones and bricks in clashes with security forces firing tear gas.
The opposition held its first major street protests since mid-July, with marchers decked out in green - the reform movement's color - waving V-for-victory signs on major boulevards in the capital.
In some cases on several blocks away, larger crowds marched in government-sponsored rallies marking an annual anti-Israel commemoration, waving pictures of Iran's supreme leader and president and placards denouncing the Jewish state.
The commemoration, known as Quds Day, is a major political occasion for the government - a day for it to show its anti-Israeli credentials and its support for the Palestinians. Quds is the Arabic word for Jerusalem. During a speech for the rallies, President Mahmoud Ahmadinejad railed against Israel and the West, questioning whether the Holocaust occurred and calling it a pretext for occupying Arab land.
But the opposition was determined to turn the day into a show of its survival and continued strength despite a fierce three-month-old crackdown against it since the disputed June 12 presidential election.
Top opposition leaders joined the protests, in direct defiance of commands by Supreme Leader Ayatollah Ali Khamenei, who barred anti-government demonstrations on Quds Day. That could provoke an escalation in the crackdown: hard-line clerics have been demanding the past week that any leader backing the protests should be arrested.
Several tens of thousands joined the opposition marches, witnesses said ? far smaller than the masses that turned out in the Quds Day rallies, which were helped by government organizing. Police and security forces, along with pro-government Basij militiamen, fanned out along main squares and avenues and in many cases tried to keep nearby opposition protesters away from the Quds Day rallies to prevent clashes, witnesses said.
Opposition supporters poured onto main boulevards and squares, wearing green T-shirts and wristbands and waving green banners and balloons. They waved pictures of opposition leader Mir Hossein Mousavi and denounced Ahmadinejad, chanting death to the dictator.
Others chanted, "Not Gaza, not Lebanon - our life is for Iran" - a slogan directly challenging the government's support for anti-Israeli Palestinian militants in Gaza and Lebanon's Hezbollah guerrilla. Some shouted for Ahmadinejad's government to resign. Some women marched with their children in tow.
But at one of the several opposition rallies around the city, a group of hard-liners pushed through the crowd and attacked former President Mohamad Khatami, a cleric who is one of the most prominent pro-reform figures, according to a reformist Web site. The report cited witnesses as saying the opposition activists rescued Khatami and quickly repelled the assailants.
Opposition Web sites reported that Khatami fell to the ground, but witnesses said he was only jostled and remained standing.
Hard-liners also tried to attack the main opposition leader, Mousavi, when he joined another march elsewhere in the city, a witness said. Supporters rushed Mousavi into his car when the hard-liners approached, and the vehicle sped away as his supporters pushed the hard-liners back, the witness said. He and other witnesses spoke on condition of anonymity for fear of government retaliation.
Another pro-reform leader, Mahdi Karroubi, who also ran in the presidential election, also joined protests elsewhere in the city.
In one of the main Tehran squares, Haft-e Tir, security forces weilding batons and firing tear gas tried to break up one of the opposition marched, and were met with protesters throwing stones and bricks, witnesses said. Several policemen were seen being taken away with light injuries. At least 10 protesters were seized by plainclothes security agents in marches around the city, witnesses said.
The pro-government Quds Day rallies were held in cities around the country, and the opposition staged competing rallies in the southern and central cities of Shiraz and Isfahan, witnesses said. In Shiraz, police rushed the protesters with batons, scuffling with them, witnesses said.
The opposition claims that Ahmadinejad won the June election by fraud and that Mousavi is the rightful victor. Hundreds of thousands marched in support of Mousavi in the weeks after the vote, until police, Basij and the elite Revolutionary Guard crushed the protests, arresting hundreds. The opposition says 72 people were killed in the crackdown, thought the government puts the number at 36. The last significant protest was on July 17.
In sheer numbers, the opposition turnout was far smaller than the mass pro-government Quds Day marches - not surprising given the state's freedom to organize the gathering.
Customarily on Quds Day, Iranians gather for pro-Palestinian rallies in various parts of the city, marching through the streets and later converging for the prayer ceremony. The ceremony was established in 1979 by the leader of the Islamic Revolution Ayatollah Ruhollah Khomeini.
Just hundreds of meters away from opposition protesters on the main Keshavarz Boulevard, thousands of Ahmadinejad supporters marched carrying huge photographs of the president and Supreme Leader Khamenei. Some in the government-sponsored rally chanted: "Death to those who oppose the supreme leader!"
At the climax of the occasion, Ahmadinejad addressed worshippers before Friday prayers at the Tehran University campus, reiterating his denial of the Holocaust, which has drawn international condemnation since 2005.
"The pretext [Holocaust] for the creation of the Zionist regime [Israel] is false ... It is a lie based on an unprovable and mythical claim," he told the worshippers. "Confronting the Zionist regime is a national and religious duty."
Want to enjoy 'Zen' reading - with no ads and just the article? Subscribe todaySubscribe now