TEHRAN - Huge crowds of Iranians turned out for the funeral of leading dissident cleric Grand Ayatollah Hossein Ali Montazeri in the holy Shi'ite city of Qom on Monday and some chanted anti-government slogans, websites reported.
Montazeri, who died late on Saturday aged 87, was viewed as the spiritual patron of a pro-reform opposition movement that blossomed after a disputed presidential election in June and has proved resilient despite repeated efforts to suppress it.
Violence flared when security forces around Montazeri's house clashed with stone-throwing protesters, the reformist website Norooz said. There was no immediate official comment.
The report could not be verified independently since foreign media were banned from reporting directly on protests and were told not to travel to Qom for Montazeri's funeral.
However, pictures obtained by Reuters showed scuffles apparently between government and opposition supporters.
The reformist website Jaras said hundreds of thousands of people joined a procession for Montazeri, a pillar of Iran's 1979 Islamic revolution. He later became a fierce critic of its hardline leadership and a staunch defender of reformists.
Innocent Montazeri, your path will be continued even if the dictator should rain bullets on our heads, the crowd chanted.
Iran's internal unrest, highlighted by Montazeri's arguments that the leadership had lost its legitimacy, has complicated the dispute over the Iranian nuclear programme, which the West believes may have military ends, not just civilian purposes.
Opposition leaders Mirhossein Mousavi and Mehdi Karroubi were photographed paying their condolences at Montazeri's house. Reformist websites said security forces arrested some opposition supporters trying to reach Qom and turned others away.
The cleric's death occurred in the tense run-up to Ashura, a politically laden Shi'ite religious commemoration that offers the opposition another opportunity to show its strength.
Shouts of Oh Hossein, Mirhossein also rose from mourners near Iran's second holiest shrine, many wearing green wristbands to show support for Mousavi.
Their cries echoed traditional Ashura laments for Hossein, a grandson of the Prophet Mohammad, killed in a 7th-century battle that sealed the schism between Sunni and Shi'ite Muslims.
Ashura, a key occasion in the Islamic Republic's calendar, will coincide with the seventh day of mourning for Montazeri, making it harder for authorities to keep people off the streets.
Riot police were out in force in Qom, 125 km (80 miles) south of Tehran, for the funeral of the senior Shi'ite cleric who had been a thorn in the establishment's side.
Pro-government Basij militiamen shouted: Shame on you hypocrites, leave the city of Qom, said the conservative Ayande website. Mourners chanted back: What happened to the oil money? It went to the Basijis.
The reformist Kaleme website said crowds had shouted: Today is the day of mourning and the green Iranian nation is the owner of this mourning, referring to the opposition colour.
Mourners carried pictures of Montazeri and of another Qom-based dissident cleric, Grand Ayatollah Yusuf Sanei.
Montazeri was named in the 1980s to succeed revolutionary leader Ayatollah Ruhollah Khomeini, but was shunted aside after he criticised mass executions of prisoners.
Khamenei, who succeeded Khomeini after he died in 1989, expressed condolences, but asked God to forgive Montazeri over a difficult and critical test that he faced towards the end of Khomeini's life -- making clear that he believed his old rival had failed the test.
Iranian newspapers published no pictures of Montazeri on their front pages, in line with what reformist websites said were orders from the Ministry of Culture and Islamic Guidance.
Khomeini's grandson, Hassan Khomeini, a cleric, paid tribute to a man who had spent many years of his honourable life ... advancing the high goals of Islam and the Islamic revolution.
Human rights activist and Nobel Prize laureate Shirin Ebadi called Montazeri the father of human rights in Iran.
President Mahmoud Ahmadinejad's re-election in a June vote that losing candidates Mousavi and Karoubi said was rigged kindled the worst unrest in the Islamic Republic's 30-year history and split the political and clerical establishment.
In August, Montazeri said the authorities' handling of the protests could lead to the fall of the regime and he denounced the clerical leadership as a dictatorship.
The authorities deny charges of electoral fraud and have portrayed the protests, quelled by Revolutionary Guards and Islamic militiamen, as a foreign-backed plot to undermine them.
Montazeri was one of the chief spiritual and religious voices of the reformist movement, said Alireza Nader, Iran analyst at the RAND Corporation in Washington.
Nader said the cleric's status as a Shi'ite religious authority and his revolutionary credentials provided a cover of legitimacy for the reformists' political and social demands.
His death leaves an important vacuum, but there are other senior clerics who are also outspoken against the Ahmadinejad administration and who demand political reform. His absence will not necessarily lead to a weakening of the opposition.
(Writing and additional reporting by Alistair Lyon; Editing by Giles Elgood)