Facing unprecedented international and domestic pressure following turbulent months that nearly brought the country to war with the world’s largest superpower, Iran is doubling down on its strategy of defiance, giving little ground to opponents at home or rivals abroad.

In a Friday prayer sermon that was his first since 2012, supreme leader Ali Khamenei signalled increased repression at home and continued paramilitary operations abroad. He described the administration of President Donald Trump as “clowns” seeking to harm the country.

And he heaped praise on Iran’s secretive clandestine overseas Quds Force, describing it as a “humanitarian” organisation that stands up for the “oppressed” of the region in a fight “without borders”.

“The spokespeople of the evil US government keep repeating that we stand beside Iranian people,” he said. “You are lying. Even if you are standing beside Iranian people, it is just so you can stab them with your poisoned daggers.”

The crowd responded with ritualistic chants of “death to America”, “death to England”, and “death to Israel”.

Mr Khamenei took to the pulpit at a crucial and perilous time for Iran. After abandoning a 2015 nuclear accord forged by his predecessor and world powers, the Trump administration began imposing harsh sanctions on the country that have crippled Iran’s economy, and escalated military tensions between the two nations. On-and-off anti-government protests have rocked the country since November.

Protests in Iran over downing of plane and tensions with the west Show all 23 1 /23 Protests in Iran over downing of plane and tensions with the west Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranian police officers take position while protesters gather in front of Amir Kabir University AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranians demonstrate following a tribute for the victims of the Ukraine Boeing 737 crash in front of the Amirkabir University in the capital Tehran EPA Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranian police dispersed students chanting "radical" slogans during a gathering in Tehran to honour the 176 people killed when an airliner was mistakenly shot down AFP via Getty Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University - People hold flowers as tear gas fired by police rises Online videos purported to show that Iranian security forces fired both live ammunition and tear gas to disperse demonstrators protesting against the Islamic Republic's initial denial that it shot down a Ukrainian jetliner AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranian police officers take position while protesters gather AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University AFP correspondents said hundreds of students had gathered early in the evening to pay respects to those killed in the air disaster ISNA/AFP via Getty Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranian protester prepares to throw a tear gas canister back at police AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University A protester confronts an Iranian police officer AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University epa08120223 Iranians protest to show their sympathy with victims of Ukraine International Airlines Boeing 737-800 in front of the Amir Kabir University in Tehran, Iran, 11 January 2020. Media reported that hundreds of Iranians protests in Tehran in solidarity with victims of the Ukraine plane as Iranian military released a statement claiming that Ukraine International Airlines flight PS752 was shot down due to human error. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranian police officers take position while protesters gathe AP Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University Iranians light candles for victims EPA Protests in Iran over downing of plane and tensions with the west Anti-government protest at Amirkabir University epa08120526 Iranians protest to show their sympathy to victims of Ukraine International Airlines Boeing 737-800 in front of the Amir Kabir University in Tehran, Iran, 11 January 2020. The Iranian military released a statement on 11 January 2020 that Ukraine International Airlines flight PS752 was shot down due to 'human error.' The passemger jet en route from Tehran to Kiev crashed minutes after takeoff on 08 January 2020, all all 167 passengers and nine crew members aboard were killed. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran People burn British and Israeli flags during a protest in front of the British embassy, in Tehran. Hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet EPA Protests in Iran over downing of plane and tensions with the west British embassy protestBritish embassy protest in Tehran Chanting "Death to Britain", up to 200 protesters rallied outside the mission a day after the brief arrest of British ambassador Rob Macaire AFP via Getty Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran epa08122502 Iranian hardliners shout slogans as they gather in front of the British embassy during an anti-Britain protest, in Tehran, Iran, 12 January 2020. According to reports, hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran Iranian demonstrators hold placards bearing the images of slain military commander Qasem Soleimani and Iran's Supreme Leader Ayatollah Ali Khamenei in front of the British embassy in the capital Tehran on January 12, 2020 following the British ambassador's arrest for allegedly attending an illegal demonstration. - Chanting "Death to Britain", up to 200 protesters rallied outside the mission a day after the brief arrest of British ambassador Rob Macaire at a memorial for those killed when a Ukraine airliner was shot down. (Photo by ATTA KENARE / AFP) (Photo by ATTA KENARE/AFP via Getty Images) ATTA KENARE AFP via Getty Images Protests in Iran over downing of plane and tensions with the west Protesters chant slogans and hold up posters of Gen. Qassem Soleimani while burning representations of British and Israeli flags, during a demonstration in front of the British Embassy in Tehran, Iran, Sunday, Jan. 12, 2020. A candlelight ceremony late Saturday in Tehran turned into a protest, with hundreds of people chanting against the country's leaders â€” including Supreme Leader Ayatollah Ali Khamenei â€” and police dispersing them with tear gas. Police briefly detained the British ambassador to Iran, Rob Macaire, who said he went to the Saturday vigil without knowing it would turn into a protest. (AP Photo/Ebrahim Noroozi) Ebrahim Noroozi AP Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran epa08122741 Iranian hardliners gather in front of the British embassy during an anti-Britain protest, in Tehran, Iran, 12 January 2020. According to reports, hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west A hardline protester holds up a placard during a demonstration in front of the British Embassy in Tehran, Iran, Sunday, Jan. 12, 2020. A candlelight ceremony late Saturday in Tehran turned into a protest, with hundreds of people chanting against the country's leaders â€” including Supreme Leader Ayatollah Ali Khamenei â€” and police dispersing them with tear gas. Police briefly detained the British ambassador to Iran, Rob Macaire, who said he went to the Saturday vigil without knowing it would turn into a protest. (AP Photo/Ebrahim Noroozi) Ebrahim Noroozi AP Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran epa08122743 Iranian hardliners gather in front of the British embassy during an anti-Britain protest, in Tehran, Iran, 12 January 2020. According to reports, hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran epa08122745 Iranian hardliners gather in front of the British embassy during an anti-Britain protest, in Tehran, Iran, 12 January 2020. According to reports, hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west British embassy protest in Tehran epa08122786 Iranian hardliners gather in front of the British embassy during an anti-Britain protest, in Tehran, Iran, 12 January 2020. According to reports, hundreds of Iranian hardliners gathered for a protest against Britain, a day after the UK ambassador to Iran Robert Macaire was detained after attending a a vigil for the victims of Ukraine passenger jet. EPA/ABEDIN TAHERKENAREH ABEDIN TAHERKENAREH EPA Protests in Iran over downing of plane and tensions with the west Protesters chant slogans while holding up posters of Gen. Qassem Soleimani during a demonstration in front of the British Embassy in Tehran, Iran, Sunday, Jan. 12, 2020. AP

Iran’s actions are often far more tempered than its rhetoric. But experts worry that it’s on a dangerous collision course with the US, which is openly pining for regime change, and could begin acting in dangerous ways that could lead to war.

“They’re not reckless,” Douglas London, who retired from the CIA clandestine service last year after decades watching Iran, told The Independent of Iran’s leadership. “They’ve not been reckless in the past. But as they get more desperate, I think there’s the potential for them to become more dangerous. They’re not going to go gentle into that good night.”

Hostilities with Washington spiked following the American assassination of Iranian commander Qassem Soleimani and Iran’s subsequent attack on a US airbase in Iraq that, US officials admitted late Thursday, injured 11 military personnel.

In the tense hours after the Iranian ballistic missile strike on the US base, possibly the first open attack by another nation on American forces since the Second World War, Iranian air defence personnel shot down a Ukrainian Airlines flight in error, killing all 176 passengers and crew aboard, prompting more protests and more international pressure.

Though Mr Khamenei acknowledged the grief of those who lost loved ones in the 8 January plane crash, he took no responsibility for what he described as a “bitter” incident, nor pinned blame on the Revolutionary Guard commanders who downed the plane, nor even promised restitution or justice for the victims.

Instead he lambasted those who protested following the plane crash as “agents” of Iran’s “enemy,” while effusively praising Soleimani as a hero of the nation.

Adding to Iran’s pressures, the 2015 nuclear deal that held even more troubles at bay is coming undone. On Wednesday, responding to Iran’s removal of limits on its nuclear programme, the United Kingdom, France, and Germany invoked a dispute resolution mechanism that could result in even more sanctions on the country.

Though Mr Khamenei said Iran was open to “negotiations” with any country other than the US, he also described the European nations as “puppets” of their “master” in the White House.

“We have no qualms about negotiating – not with the US, but with the others,” he said. “Just not from a position of weakness, rather from one of strength.”

His speech, somewhat anticipated, was devoid of any new policies or responses to the increased pressure from below by surging youth and women demanding change, and by the US and its western allies. His allies in the Council of Guardians recently disqualified hundreds of candidates from running in upcoming parliamentary elections as insufficiently loyal to the system, and some officials worry low turnout will mar the 21 February vote.

Hundreds of Iranians were killed in protests over fuel price hikes in November that were violently suppressed by regime security forces. Small anti-government protests erupted again after the Revolutionary Guard admitted it was behind the downing of the Ukrainian civilian jet after denying it for days. Young Iranians, women, and ethnic and religious minorities continue to smoulder with resentment against the regime.

“He was trying to re-fortify the classic Islamic Republic message which is about resistance, specifically against the United States,” said Sanam Vakil, an Iran expert at Chatham House. “Clearly he’s quite worried about the forthcoming elections and perceptions of legitimacy.”

One analyst suggested the main purpose of having the 80-year-old Khamenei deliver a sermon was to lift his spirits by bringing him close to the chants and emotion of the regime’s most diehard supporters.

Mr London said the Ayatollah’s tone has long been predictable.