In his first Friday sermon delivery since 2012, Iran's Supreme Leader Ayatollah Ali Khamenei has defended the Islamic Revolutionary Guard Corps (IRGC) amid a growing backlash after it mistakenly shot down a Ukrainian passenger plane, killing all 176 people on board.

Khamenei's address comes as Iran and its rulers face intense pressure at home and abroad after the United States assassinated General Qassem Soleimani, former leader of the elite Quds Force, and public anger erupted at Iran's military after its accidental downing of the commercial airliner soon after it took off from Tehran on January 8.

The Iranian leader's statement drew a quick response from US President Donald Trump, who on Friday evening wrote on social media: "He should be very careful with his words."

More:

He added in a separate post that Iranians "deserve a government that's more interested in helping them achieve their dreams than killing them for demanding respect".

In his sermon earlier on Friday, Khamenei described the downing of the plane as a "bitter" tragedy and also claimed that "Iran's enemies" used the crash and the military's admission to "weaken" the IRGC.

"The plane crash was a bitter accident, it burned through our heart," Khamenei said.

"But some tried to ... portray it in a way to forget the great martyrdom and sacrifice" of Soleimani, he added, referring to the slain head of the IRGC's foreign operations arm.

"Our enemies were as happy about the plane crash as we were sad ... happy that they found something to question the Guard, the armed forces, the system."

Thousands of worshippers gathered inside a large prayer hall in central Tehran to listen to Khamenei's address. They packed the area and streets outside the building, chanting: "Death to America."

After denying a role in the plane crash, the IGC, an elite military force answering directly to Khamenei that acts as guardian of the Islamic Republic, admitted on January 11 that one of its air defence operators mistakenly shot down Ukraine Airlines International flight 752.

Iranian authorities said earlier this week that a number of people had been arrested over the Ukrainian airliner incident.

But the downing of the plane and belated admission triggered protests in Tehran and other cities, with the authorities responding by deploying riot police outside universities, where many students had protested.

Video footage posted online showed protesters were beaten and footage also recorded gunshots, tear gas and blood on the streets. Iran's police denied firing at protesters and said officers had been ordered to show restraint.

Speaking from Tehran, Al Jazeera's Assed Baig said that Khamenei's first public sermon in eight years was due to the tension and pressure Iran has been experiencing following the tumultuous events of the past weeks.

"Khamenei usually comes out to rally support and calm the situation down, and that is essentially what he has done today here in Tehran," Baig said.

'Hand of God'

In his sermon, Khamenei also showed support for the missile strikes on US targets in Iraq in retaliation for the killing of Soleimeni, saying they showed Iran had divine support in delivering a "slap on the face" to a world power.

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

The US said on Thursday that 11 of its troops were treated for concussions after the missile attacks, after initially saying that none of its forces were wounded.

Trump, who pulled Washington out of a nuclear deal with Iran in 2018 and ratcheted up tensions by reimposing sanctions, had ordered the January 3 drone strike that killed Soleimani, who built up proxy militias across the region.

Praising Soleimani, Khamenei said his actions beyond Iran's borders were in the service of the "security" of the nation and that the people are in favour of "firmness" and "resistance" in the face of enemies.

"The few hundred who insulted the picture of General Soleimani, are they the people of Iran? Or this million-strong crowd in the streets?" he said in an apparent reference to the reported tearing down of a portrait of the dead commander by protesters in Tehran a few days after hundreds of thousands turned out for his funeral.

Khamenei accused the US of "lying" in its expressions of support for the Iranian people.

He said that even if they were with the people, "it is to stab them with their poison dagger".

Khamenei also said on Friday that three European states party to the 2015 nuclear pact "cannot be trusted", after the United Kingdom, France and Germany triggered a formal dispute mechanism in the agreement, which could lead to UN sanctions being reimposed.

According to Baig, Khamenei compared the European states involved in the nuclear deal to "a steel hand in a velvet glove".

"He's not only a spiritual leader, he's the theological and political leader of Iran," Baig said, referring to Khamenei. "And him attacking the Europeans like this could signify a change in attitude and how Iran deals with those three European countries."