Remark came as US revealed 11 of its troops had been injured in 8 January missile attacks

Iran’s supreme leader has delivered a rare sermon at Friday prayers in Tehran in which he described Donald Trump as a “clown” who pretended to support the Iranian people but would push a poisonous dagger into their backs.

Ayatollah Ali Khamenei struck a defiant tone following weeks of domestic and international turbulence, including the US killing of a top general, missile attacks on US military bases in Iraq and the accidental downing of an airliner that killed 176 people.

The mass public gatherings at funeral processions for the powerful General Qassem Suleimani showed the deep support of the people for the Islamic Republic, Khamenei said, and the Revolutionary Guards stood ready to take their fight beyond Iran’s borders.

His sermon came as the US revealed that 11 of its troops had been injured in Iranian missile strikes on two US bases in Iraq on 8 January, contradicting earlier statements by the US president that no Americans had been injured. Iran launched its missile attack in response to the US assassination of Suleimani, its most senior military leader, on 3 January.

Trump responded with a series of tweets on Friday evening. “The so-called ‘Supreme Leader’ of Iran, who has not been so Supreme lately, had some nasty things to say about the United States and Europe,” he wrote. In another, translated into Farsi, he called on Iranian leaders to “abandon terror and Make Iran Great Again!”.

Iran’s embattled regime is reeling from a wave of international condemnation and domestic criticism after admitting its forces shot down a Ukrainian passenger plane and then lied in an attempt to cover up its role in the tragedy.

Scenes of mourning for Suleimani were followed by four days of protests over the plane disaster, when demonstrators chanted “Death to Khamenei” and “Clerics get lost”. The demonstrations were quickly dispersed by the authorities with live ammunition and tear gas.

In Friday’s sermon Khamenei focused on national unity in the face of external enemies.

Trump’s “cowardly” killing of Suleimani had taken out the most effective commander in the battle against Islamic State, he said.

In response to the 3 January killing in Baghdad, Iran launched a barrage of ballistic missiles targeting US troops in Iraq. Khamenei said the strike had dealt a blow to America’s image as a superpower. In part of the sermon delivered in Arabic, he said the real punishment would be in forcing the US to withdraw from the Middle East.

As Iran’s Revolutionary Guard Corps braced for an American counterattack that never came, it mistakenly shot down Ukraine International Airlines flight 752 shortly after it took off from Tehran’s international airport, killing all 176 passengers on board, mostly Iranians.

Most of the passengers were heading to Canada, and 57 were Canadian citizens. On Friday, Canada’s prime minister, Justin Trudeau, urged Iran to send the jet’s flight data and cockpit recorders to France for analysis.

“Iran does not have the level of technical expertise – and mostly the equipment necessary to be able to analyse these damaged black boxes quickly,” Trudeau said.

Play Video Thousands protest in Tehran as Iran admits shooting down Ukrainian jet – video

Khamenei called the downing of the plane a “bitter accident” that saddened Iran as much as it made its enemies happy. He said Iran’s enemies had seized on the crash to question the Islamic Republic, the Revolutionary Guards and the armed forces.

He also lashed out at western countries, saying they themselves were too weak to bring Iranians to their knees. The UK, France and Germany, which this week triggered a dispute mechanism to try to bring Iran back into compliance with the unravelling 2015 nuclear agreement, were contemptible governments and servants of the US, he said.

Iran was willing to negotiate, but not with the Washington, the supreme leader added.

Khamenei has held the country’s top office since 1989 and has the final say on all major decisions.

Profile Who was Qassem Suleimani? Show Hide Qassem Suleimani, killed by a US drone strike in Baghdad, had become well known among Iranians and was sometimes discussed as a future president. Many considered Suleimani to have been the second most powerful person in Iran, behind supreme leader of Iran Ali Khamenei, but arguably ahead of President Hassan Rouhani. He was commander of the Quds Force, the elite, external wing of the Iran’s Islamic Revolutionary Guard Corps, which the Trump administration designated as a terror organisation in April last year. He was born in Rabor, a city in eastern Iran, and forced to travel to a neighbouring city at age 13 and work to pay his father’s debts to the government of the Shah. By the time the monarch fell in 1979, Suleimani was committed to the clerical rule of Ayatollah Ruhollah Khomeini, and joined the Revolutionary Guards, the paramilitary force established to prevent a coup against the newly declared Islamic Republic. Within two years, he was sent to the front to fight in the war against the invading Iraqi army. He quickly distinguished himself, especially for daring reconnaissance missions behind Iraqi lines, and the war also gave him his first contact with foreign militias of the kind he would wield to devastating effect in the decades to come. By the the time the Iraq government fell in 2003, Suleimani was the head of the Quds force and blamed for sponsoring the Shia militias who killed thousands of civilian Iraqis and coalition troops. As fighting raged on Iraq’s streets, Suleimani fought a shadow war with the US for leverage over the new Iraqi leadership. Once described by American commander David Petraeus as ‘a truly evil figure’, Suleimani was instrumental in crushing street protests in Iran in 2009. In recent months outbreaks of popular dissent in Lebanon, Iraq and Iran were again putting pressure on the crescent of influence he had spent the past two decades building. Violent crackdowns on the protests in Baghdad were blamed on militias under his influence.

Eighteen months before his death, Suleimani had issued Donald Trump a public warning, wagging his finger and dressed in olive fatigues. “You will start the war but we will end it.” Michael Safi Photograph: Mehdi Ghasemi/AFP

Thousands of people attended the Friday prayers, occasionally interrupting his speech by chanting: “God is greatest” and “Death to America”.

Tensions between Tehran and Washington have steadily escalated since Trump withdrew the US from Iran’s 2015 nuclear deal with world powers, which had imposed restrictions on its nuclear programme in exchange for the lifting of international sanctions.

The US has since imposed crippling sanctions on Iran, including its vital oil and gas industry, pushing the country into an economic crisis that has ignited several waves of sporadic, leaderless protests. Trump has openly encouraged the protesters, even tweeting in Farsi, hoping that the protests and the sanctions will bring about fundamental change in a longtime adversary.

Iranians braced for year of misery and unrest Read more

After Suleimani was killed, Iran announced it would no longer be bound by the limitations in the nuclear agreement. The dispute mechanism triggered by European signatories this week has been widely seen as the deal’s death knell and could result in even more sanctions.

Khamenei was always sceptical of the nuclear agreement, arguing that the US could not be trusted, but he allowed President Hassan Rouhani – a relative moderate – to conclude the agreement with Barack Obama. Since Trump’s withdrawal, he has repeatedly said there can be no negotiations with the US.