David Cameron has condemned "unreservedly" a rocket attack from the Palestinian enclave of Gaza which saw at least 30 missiles fired over the border into southern Israel.
The attack, denounced by Mr Cameron as "despicable and wicked" came hot on the heels of his address to Israel's Parliament in Jerusalem, in which he urged both sides to engage with US-led efforts to rekindle the peace process.
No injuries were immediately reported from the attack, which was described locally as the largest since 2012 and represents a major challenge to US Secretary of State John Kerry's efforts to get the two sides to sign up to a framework for final peace talks by the end of April.
Standing alongside Israeli PM Benjamin Netanyahu at his official residence in Jerusalem, Mr Cameron said: "I join you in condemning unreservedly the rocket attacks from Gaza into your country.
"These are indiscriminate attacks aimed at population centres and that tells you everything about the despicable and wicked people carrying out these attacks. I condemn them utterly."
Mr Cameron added: "They underline the importance of guaranteeing Israel's security. Any two-state solution has to have at its heart the guarantee of Israel's safety and security and the security of your people.
"Let me say again how important it is for the whole international community to say with one voice that Palestinian statehood can only come about through dialogue and discussion. It can never come about through violence or terror."
In his speech to the Knesset on the first day of a two-day visit to Israel and the Palestinian territories, Mr Cameron gave his backing to Mr Kerry's initiative to breathe new life into the stalled peace process.
He made clear he did not want to "lecture" the two sides about the concessions each should make to achieve a deal, but instead urged them to imagine the economic and human benefits which "an end of all conflict" in the Middle East could bring.
Characterising himself as a Prime Minister whose belief in Israel is "unbreakable" and whose commitment to its security is "rock solid", Mr Cameron said he would always defend the country's right to defend its citizens against attack.
As he urged Israeli MPs to look forwards and work for a peaceful future, Mr Cameron said the message from Britain was: "Simply this: We'll be with you every step of the way."
He won a warm reception from Israeli MPs on his first trip to the country as Prime Minister as he set his face firmly against any consumer or academic boycotts of their country and told them he shared their "great scepticism and deep concern" about Iran's nuclear ambitions.
Describing the regime in Tehran as "despotic", Mr Cameron said he was not "starry-eyed" about the replacement of hardliner Mahmoud Ahmedinejad with the reputedly more liberal President Hassan Rouhani. He condemned the "despicable attempt by the Iranians to smuggle more long-range rockets into Gaza" on board the ship Klos C, which was intercepted this week.
He also won applause by revealing details of his own Jewish ancestry and explaining actions he had taken to protect traditional Jewish practices and guard against anti-semitism in the UK.
Mr Cameron revealed that his family tree includes a Jewish great-great-grandfather Emile Levita, who came from Germany to Britain 150 years ago, and another ancestor Elijah Levita, who wrote what is thought to have been the first ever Yiddish novel.?
And he condemned what he said were the "abhorrent displays of anti-semitism" of French comedian Dieudonne M'bala M'bala, who was barred from entry to the UK after West Bromwich Albion footballer Nicolas Anelka made his notorious "quenelle" gesture at a Premier League match.
Rejecting calls for boycotts of Israel, Mr Cameron said: "Britain opposes boycotts. ?Whether it's trade unions campaigning for the exclusion of Israelis or universities trying to stifle academic exchange, Israel's place as a homeland for the Jewish people will never rest on hollow resolutions passed by amateur politicians...?
"It is your destiny. Delegitimising the State of Israel is wrong. ?It's abhorrent.? And together we will defeat it."
But at a press conference later with Mr Netanyahu, the Prime Minister dodged questions over whether his position meant he backed US actress Scarlett Johansson's decision to quit as an Oxfam ambassador rather than give up her work on ads for Sodastream, which has attracted criticism for its factory in an Israeli settlement in the West Bank.
Mr Cameron won a brief standing ovation for his address, but there was a less polite reception for Mr Netanyahu and Israeli Labour leader Isaac Herzog, who were repeatedly heckled as they made their speeches of welcome.
As political opponents hurled abuse at one another, Mr Netanyahu apologised to his guest that the Knesset had not yet learnt Westminster's democratic "decorum".
Mr Cameron won laughter by joking: "If I was thinking of missing Prime Minister's Questions in the House of Commons and finding somewhere to spend a quiet Wednesday afternoon, clearly I have come to the wrong place."
He set out his vision of the dividends which peace in the Middle East could deliver, not only in terms of security, but also justice, prosperity and dignity for both sides.
Mr Cameron said: "We all yearn for a lasting and secure peace between Israel and its neighbours. ?
"Britain fully supports the great work that American secretary of state John Kerry has been leading. And we believe that in prime minister Netanyahu and president Abbas you have leaders who want peace too.?
"We back the compromises needed - including the halt to settlement activity and an end to Palestinian incitement too.?
"And we recognise the difficult and courageous decisions both sides are taking, not least with prime minister Netanyahu's decision to release terrorist prisoners, with all the anguish that can bring for affected families."
He said he wanted to encourage Israelis to focus on imagining "what this land would be like if a two-state solution was actually achieved".?
And he added: "This is about justice for two peoples.?
"Dignity for the Jewish people and, yes, dignity for the Palestinian people too.?
"Generations of Jewish and Palestinian children for once growing up in hope, not fear.?
"For Israelis, a life free from the everyday fear of terror.? For the Palestinians, finally, the chance to live autonomously in a state of their own.?
"Imagine if you could look your children and grandchildren in the eye and know that your hope could become their reality.?
"These are the dividends of peace that I long for in Israel.? And I will do everything I can to help bring them about."
Mr Cameron later laid a wreath at the Yad Vashem memorial to victims of the Holocaust and met President Shimon Peres before joining Mr Netanyahu at his official residence for talks over dinner.
Mr Netanyahu told the Prime Minister that the rocket attacks from Hamas-controlled Gaza were an example of the kind of Iranian-funded Islamist extremism which threatens the peace process.
"What we are seeing today is Iranian-backed terror groups, supplied by Iran with rockets, firing at innocent civilians," said Mr Netanyahu.
"This is something that no country could tolerate... If we are to have a genuine peace, this cannot recur. We must have a peace in which territories adjacent to Israel are not used as a launching ground for rockets and missiles against the Jewish state.
"We must make sure that the backer of these terrorists, Iran, mustn't have nuclear weapons and nuclear-tipped missiles. Today we are the targets, but with the ICBMs (inter-continental ballistic missiles) that they are developing, London would be in range, Washington could be in range, in fact the whole world could be in range. That must not happen."
Asked whether the missile attack meant hopes of peace were fading, Mr Cameron said: "Obviously, achieving this peace agreement after all the disappointments and setbacks of the past is extremely difficult and no one should be starry-eyed about it or over-optimistic about it."
But he added: "We should travel in hope, travel in optimism, but know that it is extremely difficult to fix this problem."
Mr Cameron was surprised to be mistaken for his Labour predecessor Gordon Brown by an Israeli TV correspondent, who addressed him as "Prime Minister Gordon".
To laughter at the press conference, he told her: "I've been mistaken for a lot of people in my life, but that's a new one for me."
Mr Netanyahu added: "Britain is a democracy. These things change."