Sir Keir Starmer has joined Joe Biden and other world leaders in a call for “Iran to stand down” amid ongoing tension in the Middle East.
The prime minister also spoke to Iranian president Masoud Pezeshkian on Monday night, warning him of a “serious risk of miscalculation”, Downing Street said.
It comes as Israel braces itself for a major attack with Iran vowing retaliation against Israel after the death of the leader of Hamas in Tehran last month.
The US has also sent a nuclear-powered guided-missile submarine to the Middle East while Israel’s air force has suspended travel abroad for its service personnel.
Meanwhile, the US and its allies are pushing for Israel and Hamas to agree to a ceasefire agreement over the war in Gaza.
On Monday, Sir Keir held a 30-minute call with Mr Pezeshkian, asking him to refrain from attacking Israel and saying that war was not in anyone’s interest.
The No 10 spokesperson said: “The prime minister said that he was deeply concerned by the situation in the region and called on all parties to de-escalate and avoid further regional confrontation.
“There was a serious risk of miscalculation and now was the time for calm and careful consideration, the prime minister said.
“He called on Iran to refrain from attacking Israel, adding that war was not in anyone’s interests.”
Also on Monday evening, a joint statement was issued by Sir Keir, Mr Biden, French president Emmanuel Macron, German chancellor Olaf Scholz and Italian prime minister Giorgia Meloni.
It read: “We, the leaders of the United States, the United Kingdom, France, Germany, and Italy discussed the situation in the Middle East.
“We expressed our full support for ongoing efforts to de-escalate tensions and reach a ceasefire and hostage release deal in Gaza.
“We endorsed the joint call from President Biden, President Sisi of Egypt, and Amir Tamim of Qatar to renew talks later this week with an aim to concluding the deal as soon as possible, and stressed there is no further time to lose. All parties must live up to their responsibilities.
“In addition, unfettered delivery and distribution of aid is needed. We expressed our support for the defense of Israel against Iranian aggression and against attacks by Iran-backed terrorist groups.
“We called on Iran to stand down its ongoing threats of a military attack against Israel and discussed the serious consequences for regional security should such an attack take place.”
The deal endorsed by the US, Egyptian and Qatar leaders is for a three-phase framework to demand Israel withdraw its troops from Gaza, Hamas return hostages to their families and the safe and effective distribution of humanitarian aid.
It aims to bring to an end the conflict that started when Hamas launched the surprise attack on 7 October last year.
Israel claims some 1,200 people were killed and 251 taken hostage following the attack. The Palestinian death toll is thought to be approaching 40,000 as a result of conflict in Gaza.
Iran-backed Hezbollah militants, based in Lebanon, have traded rocket fire with Israel over recent weeks and Hamas’ political chief Ismail Haniyeh was assassinated in Iran’s capital at the end of July.
At least 80 people died on Saturday when an Israeli air strike hit a school-turned-shelter in Gaza City, according to Palestinian health authorities.
Israel claimed it had hit a Hamas command centre at the venue, but Hamas has denied it had a base there.
US Vice President Kamala Harris said on Saturday: “Yet again, far too many civilians have been killed.”