Tens of thousands of Iranians chanted for the downfall of supreme leader Ayatollah Ali Khamenei, branding him a “dictator,” as they attended the funeral of a religious leader who opposed the current regime.

The protest took place during the funeral of Ayatollah Jalaluddin Taheri, who died at the age of 87 and was buried in Isfahan on Sunday. Taheri was known for openly opposing the Tehran government and its hardline religious leaders.

Amid cries of “death to the dictator,” protesters also called for the release of political prisoners and in particular Mehdi Karoubi and former presidential candidate Mir Hossein Mousavi, two leaders of the reformist green movement who are under house arrest in Tehran.

The incident came less than 10 days before the Iranian presidential elections, and authorities refrained from intervening to avoid inciting the crowds, BBC Persia reported on Tuesday.

Taheri was a prominent Friday prayer leader in Isfahan, one of Iran’s largest cities, who resigned his position in 2002 in protest at the political and economic situation in the country.

Karoubi and Mousavi were arrested following the 2009 presidential elections that saw the re-election of Mahmoud Ahmadinejad amid claims of election fraud. The protests against the election results swelled into widespread street demonstrations that became known as the “green movement” after the party colors of Karoubi and Mousavi. However, the newly elected regime forcefully repressed the protests and the two opposition leaders were placed under house arrest.

Iranians will choose their next president on June 14. Ahmadinejad, who has served two terms since being elected in 2005, is barred from running for a third term. Opposition movements have claimed that authorities are cracking down on potential candidates and their supporters to try to prevent a reformist victory in the elections.

On Tuesday, Khameni urged voters to not make concessions to appease the West, an implied rebuke to several of the hopefuls running in the elections who said they would focus on improving the Islamic Republic’s relations with other countries.