Benjamin Netanyahu has told UK Foreign Secretary Lord Cameron that Israel would “make its own decisions” over how to respond to an Iranian attack.
He said his government would “do everything necessary to defend itself” during talks the British government had hoped would help prevent escalation.
Mr Netanyahu has repeatedly vowed to retaliate to the unprecedented missile and drone assault at the weekend.
Lord Cameron told him any response should be “smart” and limited.
Speaking to reporters in Jerusalem after the meeting with Mr Netanyahu, Lord Cameron said he was there to “demonstrate our solidarity” after Iran’s “appalling” attack.
He continued: “We hope that anything Israel does is as limited and as targeted and as smart as possible.
“It’s in no-one’s interest that we see escalation and that is what we said very clearly to all the people I’ve been speaking to here in Israel.”
After the meeting, the Israeli prime minister said: “I want to make it clear – we will make our own decisions, and the State of Israel will do everything necessary to defend itself.”
Mr Netanyahu’s remarks will reinforce the belief in western capitals that Israel is set to take action against Iran and there is a limit to how often they can call for restraint.
Israel is more than aware of concerns in Europe and the United States about the war escalating in the region.
However, western leaders may take comfort from the fact that Israeli leaders are trying to exploit the diplomatic support they have gained after Iran’s attacks, which has seen international condemnation and the promise of new sanctions on Tehran.
It is possible Mr Netanyahu may not want to destroy that alliance with an act of retaliation that plunges the region into a full-scale war.
Lord Cameron is one of several Western foreign ministers who are expected to visit Israel in the coming days as part of a diplomatic drive to prevent that from happening.
Before meeting Mr Netanyahu, Lord Cameron held talks with Israeli President Isaac Herzog and Israeli Foreign Affairs Minister Israel Katz.
The UK foreign secretary also visited the Occupied Palestinian Territories to meet Mohammad Mustafa, the Prime Minister of the Palestinian Authority.
G7 ministers are gathering in Italy, where Lord Cameron will push for co-ordinated sanctions on Iran.
Earlier, he accused Tehran of being “behind so much of the malign activity” in the Middle East and called for other countries to adopt measures designed to restrict Iran’s influence.
The US and European Union are considering further sanctions, and Israel is calling on its allies to designate the Islamic Revolutionary Guard Corps (IRGC) – a major military, political and economic force in Iran – as a terrorist organisation.
The Israeli government has repeatedly vowed to retaliate after Iran sent more than 300 drones and missiles towards Israel in an unprecedented direct attack overnight on Saturday.
Almost all the projectiles were intercepted by Israel’s air defence systems, with the help of the UK, US, France, and Jordan.
Iran’s direct attack on Israel was carried out in response to a strike in Syria on 1 April which killed senior Iranian military figures. Israel has not publicly confirmed it was behind the attack, but is widely believed to have been.
On Tuesday evening, UK Prime Minister Rishi Sunak spoke to Mr Netanyahu and warned that “significant escalation will only deepen instability in the region”, adding: “This is a moment for calm heads to prevail.”
Lord Cameron will seek to reinforce Mr Sunak’s call for restraint during his visit to Israel, and put more pressure on its leaders to do more to allow humanitarian aid into Gaza – but he is walking a delicate diplomatic line.
The foreign secretary will not want to appear to be hectoring an ally which has just been subject to an unprecedented attack on its soil.
That is why Lord Cameron is also talking about the need for Hamas to release hostages and the importance of western powers imposing yet more sanctions on Iran.
His presence in Jerusalem is a show of support and solidarity – but also an attempt to warn Israeli leaders that any significant escalation would be against their interests and the world’s.