Sir Keir Starmer has urged Iran to "refrain" from attacking Israel.
The Prime Minister told Iranian President Masoud Pezeshkian "now was the time for calm and careful consideration", Downing Street said.
The UK has issued a joint statement with the US, France, Italy and Germany, urging Iran to end any threat of attack.
Israel has been braced for an attack following the assassination of Hamas leader Ismail Haniyeh in Tehran last month.
He was attending the funeral of Ebrahim Raisi, a former Iranian President who was killed in an explosion that has been attributed to Israel.
The joint statement from the quartet of countries 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.”