The Revolutionary Guards can take their fight beyond Iran's borders, the supreme leader says, responding to the US killing of a top general and to unrest at home over the accidental downing of an airliner.

In his first Friday prayers sermon in eight years, Ayatollah Ali Khamenei also told thousands of Iranians who chanted "Death to America" that European states could not be trusted after they launched a nuclear agreement dispute mechanism.

"Resistance must continue until the region is completely freed from the enemy's tyranny," Mr Khamenei said, in a reference to the US that renewed his call for US troops to leave neighbouring Iraq and the wider Middle East.

Washington's withdrawal in 2018 from Tehran's nuclear deal with world powers and the reimposition of US sanctions has triggered an escalation in tensions over several months that briefly led to open conflict in January.

AAP

US President Donald Trump ordered the killing in a drone strike on 3 January of Qassem Soleimani, commander of the Quds Force, a unit of the Revolutionary Guards responsible for expanding Iran's influence abroad. He built up regional militias that Washington has blamed for attacks on US forces.

Iran responded with missile strikes on US targets in Iraq on 8 January, injuring although not killing US troops.

"The fact that Iran has the power to give such a slap to a world power shows the hand of God," said Mr Khamenei, in a reference to the strikes, adding that the killing of Mr Soleimani showed Washington's "terrorist nature".

"The Quds Force is a humanitarian organisation with human values that protects people across the region," Mr Khamenei said. "They are fighters without borders."

In the tense aftermath of Iran's missile strikes on US targets, when Iranian forces expected US reprisals, the Guards' air defences shot down a Ukrainian airliner in error.

It took days to admit the mistake, a delay that sparked protests across Iran that sometimes met a violent crackdown.

Mr Trump sent tweets in Farsi and English to support the demonstrators, drawing a sharp response from Mr Khamenei.

"These American clowns who lie and say they are with the Iranian people should see who the Iranian people are," he said on Friday.

READ MORE Donald Trump warns Iran against 'massacre' as protests erupt over jetliner downing

Mr Khamenei called for national unity and said Iran's "enemies" had tried to use the downing of Ukraine International Airlines flight 752 to shift attention from the killing of Mr Soleimani.

There were four days of protests over the plane disaster, when demonstrators chanted "Death to Khamenei" and "Clerics get lost".

To quell the demonstrations, riot police were sent onto the streets in force, lining up outside universities that were a focus for the protests. Video footage online showed protesters were beaten and also recorded gunshots and blood on the streets.

Iran's police denied firing at protesters and said officers had been ordered to show restraint.

READ MORE EU states launch dispute process over Iran violations of nuclear deal

Washington reimposed sanctions after it withdrew from Tehran's nuclear pact with world powers. Since then, Tehran has scaled back on its commitments to the deal, including saying it would stop observing limits on uranium enrichment.

Britain, France and Germany have launched a dispute mechanism in the deal, which starts a diplomatic process that could lead to the reimposition of UN sanctions.

"These European countries cannot be trusted. Even their negotiations with Iran are full of deceit," Mr Khamenei said.