Gordon Brown said there were great opportunities for a peace settlement
Gordon Brown has said he is optimistic Israel and the Palestinians can sign a peace deal, and has promised British funds to help it work.
The PM was speaking after meetings with Israeli and Palestinian leaders during a visit to the Middle East.
Mr Brown said the UK "would do anything we can" to underpin a political breakthrough with economic support.
Earlier he said there was an "urgent need for justice" for the Palestinians, and a viable Palestinian state.
Speaking at a joint press conference after talks with the Israeli Prime Minister Ehud Olmert, Mr Brown said he "understood the obstacles" to a peace settlement.
But, he added: "There are great opportunities and we now need to move forward to a peace settlement which is viable and long-lasting."
Mr Olmert said he was confident that a deal could be reached by the end of 2008.
And he revealed that Mr Brown had criticised the Israeli government's policy of continuing to build settlements on disputed land.
Turning to Mr Brown, he said: "You criticised our settlement policy, and I tried to explain to you the restraints that we put on ourselves on the one hand, and the need to keep the pace of life going on the other.
"While you disagree with us I hope you understand the position of Israel."
Mr Brown also spoke of the need of step up diplomatic efforts to deal with Iran's nuclear programme.
Gordon Brown and his wife visited the Yad Vashem Memorial Museum
He said he would speak more fully on that subject on Monday when he becomes the first British head of government to address the Israeli parliament, the Knesset.
Earlier, Mr Brown has announced £30m of additional financial support for the Palestinian Authority (PA), on a visit to the West Bank.
He also promised further support in training the Palestinian police, after talks with PA President Mahmoud Abbas.
Mr Brown said the assistance would help the "great entrepreneurial flair" of the Palestinian people come alive and said he would host an investment conference in London.
The prime minister said the West Bank barrier erected by Israel was "graphic evidence of the urgent need for justice for the Palestinian people" and an end to the occupation of Palestinian land.
However, he emphasised that progress will largely depend on establishing an end to violence and a resolution to disagreements over Israeli settlements in the West Bank.
Mr Brown called on all parties to "seize the opportunity" to create "a Palestinian state that is viable alongside an Israel which is secure".
Mr Brown began his visit by laying a wreath at Jerusalem's Holocaust museum.
Afterwards he said: "Nothing prepares you for what we see here.
"This is the story of the atrocities that should have been prevented, the killings that should never have happened, the truth that everybody who loves humanity should know."
He said he was committed to enabling pupils from every school to go on trips to Auschwitz to learn about what happened there.
The visit to Israel is Mr Brown's first since taking over as prime minister a year ago.