Three demonstrators have been killed during clashes with Iranian security forces in the western town of Mahabad, state media has reported.

The protesters reportedly targeted government buildings after attending the memorial ceremony of a man killed during unrest in the country.

Security forces also reportedly opened fire at a cemetery near Khorramabad. Rights group Amnesty International says security forces have killed eight people since Wednesday.

Unrest has rocked the country since Mahsa Amini died in police custody 40 days ago after allegedly wearing her Islamic headscarf "improperly".

Officials in Mahabad accused "terrorist-separatist groups" of inducing demonstrators to attack government facilities in the town.

State media has not identified the victims, but the opposition outlet Hengaw reported that a man and two women had died after being shot by security forces

Several hundred people had reportedly gathered around the municipal governor's offices in the largely ethnically Kurdish town, but state media insisted police had the situation under control.

Videos from Khorramabad showed protesters chanting anti-state slogans including "down with the dictator", a reference to Iran's supreme leader, Ayatollah Khamenei.