It is rare indeed for there to be moments of mirth in the tense diplomatic stand-off with Iran but British Prime Minister Boris Johnson managed to do just that during his meeting with Iranian President Hassan Rouhani at the United Nations General Assembly this week.

The main purpose of Mr Johnson’s meeting with the Iranian leader was to raise the plight of Nazanin Zaghari-Ratcliffe, the British-Iranian woman who has been jailed in Tehran for what the British authorities insist are false espionage charges. But Mr Johnson, in common with other European leaders such as French President Emmanuel Macron, was also keen to try to persuade Mr Rouhani to re-enter negotiations with the US over Iran’s nuclear activities.

While Mr Johnson’s suggestion to enter talks with the US made little impression on the Iranian leader, he nevertheless managed to introduce a moment of levity to the proceedings by inviting the Iranian leader to continue their dialogue in Britain. He even suggested that Mr Rouhani time his visit to coincide with next year’s climate summit in Glasgow, remarking: “As you know, Glasgow is lovely in November” – a tongue-in-cheek reference to the Scottish city’s notoriously cold and damp conditions at that time of year. This seemed to amuse Mr Rouhani, who spent some time in the city in the 1990s studying as a postgraduate student at Glasgow Caledonian University for a doctorate on sharia “with reference to the Iranian experience”.

Yet despite the concerted efforts of Mr Johnson and other European leaders to try to defuse tensions with Iran, their endeavours made little impact on the Iranian leader, which was clearly evident when the time came for Mr Rouhani to address the General Assembly, when he categorically ruled out the possibility of Iran entering negotiations, so long as US sanctions remained in place.

Indeed, Mr Rouhani’s UNGA address, together with his surprise appearance on US President Donald Trump’s favourite television channel Fox News, provided a fresh insight into how Tehran really views the world, one that hardly suggests the regime's leaders have any real intention of improving their global standing.

Rather than acknowledging the destabilising influence Iran’s confrontational approach has on the Middle East, as well as the wider world, Mr Rouhani sought to portray Iran as the victim, the innocent target of American aggression that aimed to destroy the country.

The biggest challenge to regional security, Mr Rouhani contended, was not Iran but the US and its allies, and it was only when those promoting “foreign intervention” in the region withdrew their forces that there would be any chance of peace.

“The security of our region shall be provided when American troops pull out,” said Mr Rouhani. “Security shall not be supplied with American weapons and intervention.”

The Iranian leader even proposed setting up a regional coalition to guarantee the safety of shipping in the Strait of Hormuz – the so-called Hormuz Peace Endeavour – although he was less forthcoming about which countries might participate in such an arrangement, saying only that details about the coalition would be forthcoming.

The real insights into Tehran’s current thinking, though, were to be found in Mr Rouhani’s comments relating to other issues, such as the conflict in Yemen, which he declared could only be resolved when Saudi Arabia terminated its “aggression” in the country, a somewhat ludicrous claim given that it was Iran’s support for the Houthi rebels in their bid to remove the country’s democratically elected government that provoked the conflict in the first place.

Mr Rouhani was equally critical of the Trump administration and the economic sanctions it imposed on Tehran following last year’s decision to withdraw from the 2015 nuclear deal. The US, he said, was engaged in “merciless economic terrorism” against his country, which was designed to prevent Iran from participating in the global economy. In his view, the US had “resorted to international piracy by misusing the international banking system”.

Perhaps the most astonishing remarks Mr Rouhani made during his visit to New York came during his Wednesday night appearance on Fox News, when he defended his support for groups like Hezbollah and Hamas, widely regarded as terrorist organisations.

Despite the concerted efforts of Boris Johnson and other European leaders to try to defuse tensions with Iran, their endeavours made little impact on the Iranian leader

Mr Rouhani defended the continued financial support Tehran gives to these groups by arguing that they were freedom fighters, not terrorists.

“Iran during the last four decades fought against terrorism unequivocally,” he said, adding: “Iran is a country that has brought peace to the region.” In his UN address, he declared: “We Iranians have been pioneers of freedom-seeking movements.”

The Iranian leader’s comments might appear delusional but they need to be taken seriously because they provide an important insight into how Tehran currently views the world. And they also underline the enormity of the challenge western powers and their allies face in trying to curb further acts of Iranian-sponsored aggression, such as the recent attacks on Saudi Arabia’s oil installations.

Mr Rouhani’s uncompromising remarks, which dealt the final blow to any hopes Mr Trump might still have entertained of meeting the Iranian leader face-to-face, will have been a major disappointment for those European leaders such as Mr Johnson and Mr Macron, who had hoped that, by maintaining their commitment to the nuclear deal, they might persuade Tehran to resume negotiations.

But that prospect now looks even more unlikely after the three European signatories to the agreement – Germany, France and Britain – issued a joint statement blaming Iran for carrying out the attacks against Saudi Arabia, a view that was reinforced during Mr Johnson’s meeting with Mr Rouhani.

In short, all that Mr Rouhani’s New York visit showed was that the prospects of any change of behaviour in Iran’s conduct remain as remote as ever.

Con Coughlin is the Telegraph’s defence and foreign affairs editor