Demonstrations that drew thousands more later spread to other parts of the capital Tehran and more clashes with security forces erupted. Witnesses said police fired tear gas at dozens of demonstrators on Valiasr Street who set tires and trash cans ablaze in response.
Police barred opposition leader Mir Hossein Mousavi from joining the crowd around the grave of Neda Agha Soltan, a young woman was shot to death at a June 20 to protest the disputed presidential election. The 27-year-old music student's dying moments on the pavement were filmed and circulated widely on the Web, and her name became a rallying cry for the opposition.
"Neda is alive, Ahmadinejad is dead," some of those at the ceremony chanted, referring to President Mahmoud Ahmadinejad, who the opposition claims won the June 12 election by fraud. Witnesses said plainclothes forces charged at them with batons and tear gas, some of them chanting, "Death to those who are against the supreme leader." State television also reported that police used tear gas to disperse the demonstrators.
An amateur video that purports to show the memorial shows thousands marching through the cemetery, chanting and flashing victory signs. Some wore green T-shirts - the color of Mousavi's reformist movement.
With Thursday's ceremony, the opposition aimed to harness growing anger over abuses in the nearly 7-week-old crackdown and give their movement further momentum in the face of the continuing wave of arrests. Allegations of torture against jailed protesters - some to the point of death - have become an embarrassment to the clerical leadership, bringing criticism from top clerics and even fellow conservatives.
Thousands also gathered at the main Mosalla mosque in central Tehran, with heavy security forces nearby and at other major intersections.
When Mousavi arrived at the grave site, hundreds of police surrounded him as supporters chanted "Yaa Hossein, Mir Hossein" - comparing their leader to the Prophet Muhammad's grandson Hussein, who is the most revered Shiite saint. Police forced Mousavi to leave Behesht-e Zahra, the vast cemetery on Tehran's southern outskirts where many of those killed in the crackdown have been buried, the witnesses said.
Afterward, his supporters remained at the grave, chanting, "Death to the dictator," as the crowd swelled to several thousand, said the witnesses who asked not to be identified out of security concerns.
The police charge came when an ally of Mousavi, Mahdi Karroubi - who was also a candidate in the June 12 election - tried to give a speech. Karroubi had to flee the site, and several of aides were beaten and harassed, according to pro-opposition Web sites.
Even after the clash, thousands of supporters continued to visit Soltan's grave. Passengers on the subway ride back from the cemetery to central Tehran chanted slogans against Ahmadinejad: "Traitor Mahmoud, we want you to become homeless," witnesses said.
Police arrested two prominent Iranian filmmakers when they tried to lay flowers at Soltan's grave. One of them was Jafar Panahi, best known for his film "The Circle," which was critical of the treatment of women under the Islamist government and was banned in Iran. A female documentary maker, Mahnaz Mohammadi, was arrested with him.
The memorial service marked the end of the 40-day mourning period under Islam for 10 people killed in protests and clashes on June 20, including Soltan. Opposition supporters had also spoken in the past few days of holding separate memorials in various parts of Tehran at the same time, but there was no sign of other demonstrations.
According to a count by a parliament committee, 30 people were killed in the heavy crackdown by security forces after the disputed June 12 presidential election. Human rights groups, however, say the true number is likely several times that amount. Hundreds were arrested in the sweeps, including young protesters, politicians and longtime critics of the government.
The memorial presses the government on an issue that has increasingly caused it trouble the past week - allegations the crackdown that crushed the protests following the disputed election has gotten out of control.
Hundreds were arrested in the sweeps, including young protesters, politicians and longtime critics of the government. Many have been held in secret locations, without contact with relatives. In recent weeks, the bruised bodies of several young protesters have been handed over to families. Conservatives joined in criticism after the son of a senior conservative figure turned up dead after being arrested after a protest.
Some critics have compared the government crackdown to the torture and oppression under Iran's former ruler, the U.S.-backed Shah Mohammad Reza Pahlavi, who was overthrown in the 1979 revolution and is that led to the creation of the Islamic Republic.
"Was the regime of the shah able to resist the wave of dissatisfaction by using terror, oppression, censorship, torture, forced confessions and lying propaganda?" a top cleric Ayatollah Ali Hossein Montazeri said in a statement on Wednesday condemning the crackdown.
During the revolution, deaths of protesters prompted mourning protest marches after 40 days, which would often be answered by security forces attacking mourners. This caused new deaths and new marches in a cycle that helped fuel the street uprising.
Behesht-e Zahra, where Thursday's gathering was held, also holds great symbolic weight. Many of those killed during the revolution were buried there, and the revolution's leader Ayatollah Ruhollah Khomeini has a gigantic mausoleum complex nearby. Martyrs from Iran's 1980-1988 war with Iraq are also buried in the cemetery, and families frequently visit the graves.
Soltan and at least 24 others killed in the crackdown are buried at the cemetery, according to rights groups trying to track the dead.
Soltan's mother, Hajar Soltan, told the British Broadcasting Corp. on Thursday she is waiting for Neda's killer to be arrested and brought to justice.
"Her death has been so painful. Words can never describe my true feelings. But knowing that the world cried for her, that has comforted me. I am proud of her. The world sees her as a symbol and that makes me happy," she said.
Mousavi and Karroubi asked permission for the ceremony from the Interior Ministry earlier this week, saying the gathering would "be held without any speeches and will be limited to the reciting of the Quran and moments of silence."
Interior Ministry official Mahmoud Abbaszadeh Meshkini was quoted by the state IRNA news agency as saying Wednesday the ministry has not issued "any permission for any gathering."
"So far, it's unprecedented that someone asks permission for a memorial service from the Interior Ministry," Meshkini said, adding sarcastically: "Unless the applicant has other particular political intentions."
Massive protests and deadly clashes erupted in the days and weeks after Mousavi claimed that he won the vote and Ahmadinejad's victory was fraudulent. Iran's powerful Revolutionary Guard and its allied Basij militia have adopted a zero-tolerance policy, but demonstrators have still managed to hold several, smaller protests in recent weeks.
The government announced on Wednesday that first trials of detained opposition supporters will begin Saturday, with the prosecution of around 20 protesters. They also include some accused of sending images of the unrest to the media while top pro-reform politicians will be tried later for allegedly ordering riots. The opposition has said detainees were tortured to extract false confessions for the courts.