David Cameron has urged the leaders of Israel and the Palestinian Authority to be "partners for peace" after holding talks with both sides during a two-day visit to the Middle East.
The Prime Minister's visit was overshadowed by a massive rocket attack on Israel from Hamas-occupied Gaza, which caused no injuries but sparked air strikes by Israel in response.
Despite the attack - which he condemned "unreservedly" - Mr Cameron said he still believed it would be possible to reach a final settlement between Israel and the Palestinians under the renewed drive in the peace process being pushed by US Secretary of State John Kerry.
Speaking alongside Palestinian President Mahmoud Abbas after talks in Bethlehem, which followed discussions with Israeli Prime Minister Benjamin Netanyahu in Jerusalem yesterday, Mr Cameron said: "They both will have to take difficult and unpalatable and sometimes unpopular decisions for their constituencies in order to achieve that settlement, but I sense it's possible. I'm not saying it's definite or even probable, but it's certainly possible."
Mr Cameron also held brief talks with his Labour predecessor as premier, Tony Blair, who is now the special envoy of the Quartet of the UN, US, EU and Russia, working on the development of the Palestinian economy.
Mr Blair said the missile attack illustrated the scale of the problems in Gaza, but added: "I don't think, even with these rocket attacks, that should get in the way of pursuing a political process and a political negotiation that allows, under the leadership of the US, the two sides to come together and to try and describe an outline of what the two-state solution looks like and how a Palestinian state is going to be and to operate and to function."
The former PM said Mr Cameron was right to stress the importance of economic and business links to creating a stable and prosperous Middle East, and said: "The British Government has actually got a great opportunity here, because it is relatively trusted by both sides, which is quite rare in this situation."
Following their talks, Mr Cameron was asked whether he had a friendly relationship with the former occupant of 10 Downing Street.
He replied: "I wouldn't say it is about friendship... We come from different political parties, different political traditions and there are many things we disagree about, but we both want a two-state solution and he has got a contribution to help bring that about by helping generate Palestinian economic growth.
"I obviously listen to Tony Blair's advice, as I listen to many people's advice."
Mr Cameron came under fire from Palestinian commentators for his strongly pro-Israel speech to the Knesset in Jerusalem yesterday, and particularly for his description of a post-settlement Israel as a homeland for the Jewish people.
Challenged over his comment by a Palestinian reporter, he said: "I said that because, to me, that is what Israel is and Israel will be.
"Jews were persecuted around the world, six million were murdered in the Holocaust, so a decision was taken that Israel should be a homeland for the Jewish people and that's what it is."
Mr Cameron announced new UK cash to support the development of a strong Palestinian economy and institutions, including financial support for 100 companies to help them compete, £6 million of support for farmers and funding for the Halo Trust to clear three West Bank minefields.
He also welcomed the reopening of a British Council English language centre in Palestinian east Jerusalem after an absence of more than a decade.
He restated Britain's wish for the peace process to produce a two-state solution, with a viable Palestinian state alongside a safe and secure Israel.
And he told Mr Abbas: "I have been encouraged by discussions with yourself and Prime Minister Netanyahu that the will is there. I encourage both sides to seize this window of opportunity.
"The path to this future vision will not be an easy one. The final difficult steps towards peace will be hard. But the prize could be great.
"A Palestine without checkpoints... where the West Bank and Gaza are together again. A world in which you have your dignity and freedom at last and security for Palestinian people as well.
"It won't be easy but this is a vision we stand absolutely committed to helping you realise."
Mr Abbas, who was due to fly to the US to meet President Barack Obama following his talks with Mr Cameron, said it was not yet possible to say whether the Palestinians accept the framework for final status talks being put forward by Mr Kerry, as he had not yet seen it.
The Palestinian leader welcomed Mr Cameron as "a guest, a friend, a dear guest for Palestine from a dear nation and a dear country that we respect".
He made clear that he did not object to Mr Cameron's rejection of calls to boycott Israel, pointing out that the Palestinian Authority does not support boycotts of the state of Israel, but of the illegal Israeli settlements on Palestinian land.
"Israeli products coming from settlements need to be boycotted. This is what's happened in Europe and what we encourage," said Mr Abbas.
Mr Cameron went for a jog in the rainy streets of Jerusalem before embarking on today's round of meetings.
He also met young Palestinian business people from east Jerusalem and spoke by video-link to three young women in the Gaza Strip - where he said the current situation was "unacceptable - to ask them about their hopes for the peace process.
One replied: "This is something we have been hearing about ever since we were born, the two-state solution, and we have seen nothing. Our generation has seen a lot of violence and suffering."
Mr Cameron said he hoped that "one day, hopefully not too far away", he would be able to return to east Jerusalem as the capital of a Palestinian state.
"That's the British position," he said. "We support the two-state solution and that means two states with genuinely mutual respect and understanding."
The Prime Minister took time out from his round of discussions to visit the site considered to be the birthplace of Jesus Christ, entering the Church of the Nativity in Bethlehem through a low stone doorway known as the "door of humility" because it forces visitors to bow down as they go through.