“I’m not there to make them happy,” he told reporters. “For all the countries who care about international law, they should be doing something about it.”

As they went into the meeting, UK Foreign Secretary Yvette Cooper told the media: “We need to see a swift resolution to this conflict that restores the regional stability, that needs to include the Strait of Hormuz.”

About 20% of the world’s oil and liquefied natural gas typically passes through the strait and the war has caused concern over price rises and potential shortages.

Ministers from the G7 have previously said they are ready to take “necessary measures” to support the global energy supply.

At a meeting of the ministers on Thursday, German Foreign Minister Johann Wadephul said the group should develop a “common position” with the US to help bring the war to a swift end.

He added that the talks with Rubio would be important, and that France and Britain share the same position.

Hours before Rubio headed to France, US President Donald Trump again criticised Nato, of which all G7 countries except Japan are members, and said allies in the military alliance had “done absolutely nothing to help with” the situation.

Discussions about Iran may overlap with talks about Russia’s war in Ukraine.

Ukraine’s Foreign Minister Andrii Sybiha said he met Rubio on Friday morning on the sidelines of the G7 meeting, writing that America’s role in “advancing peace efforts remains critical”.

“We also spoke about the developments in the Middle East. Ukraine’s position is that the regimes in Moscow and Tehran work together to prolong the war,” he said.

The EU’s foreign policy chief, Kaja Kallas, who is attending the G7 meeting, said the conflicts were “very much interlinked”, adding that if the US wanted to stop the Iran war, it should “also put the pressure on Russia”.

The UK’s Defence Secretary, John Healey, told the BBC on Thursday that before the conflict Russia had been sharing intelligence and providing training to Iran on types of drones and electronic warfare.

“As far as Iran goes, they’re demonstrating a capacity to hit across the Middle East, we see the same tactics and technologies that we see employed by Russia in Ukraine, and this is the hidden hand of Putin in both conflicts,” he said.