Britain is ready to bring forward the moment when it formally recognises a Palestinian state, the foreign secretary has suggested.
Lord Cameron said Palestinians had to be given a political horizon to encourage peace in the Middle East.
He is beginning his fourth visit to the region since being appointed foreign secretary in November.
The UK has a responsibility to set out what a Palestinian state would look like, he told a Westminster reception.
The Palestinian people would have to be shown "irreversible progress" towards a two-state solution, Lord Cameron said.
"As that happens, we - with allies - will look at the issue of recognising a Palestinian state, including at the United Nations," he told the Conservative Middle East Council.
"That could be one of the things that helps to make this process irreversible."
The foreign secretary also urged Israel to allow more humanitarian support into Gaza and said it was "ludicrous" that vital British and other aid was being sent back at the border.
Lord Cameron said the last 30 years had been a story of failure for Israel because it had failed to provide security to its citizens.
Only by recognising that failure, he said, would there be peace and progress.
Britain has long supported a two-state solution, where Israelis and Palestinians could live side by side in separate countries.
But Lord Cameron is suggesting Britain could give formal, diplomatic recognition to a Palestinian state not as part of a final peace deal, but earlier, during the negotiations themselves.
At the same time, there would have to be a new Palestinian authority "stood up quickly" with "technocratic and good leaders" able to govern Gaza, he said.
Lord Cameron added: "Together with that, almost most important of all, is to give the Palestinian people a political horizon so that they can see that there is going to be irreversible progress to a two-state solution and crucially the establishment of a Palestinian state.
"We have a responsibility there because we should be starting to set out what a Palestinian state would look like, what it would comprise, how it would work and crucially, looking at the issue, that as that happens, we with allies will look at the issue of recognising a Palestinian state, including at the United Nations.
"That could be one of the things that helps to make this process irreversible."
As part of any long-term deal, the foreign secretary said Israel would need to see all hostages released, with a guarantee that Hamas could not launch attacks on Israel and its leadership had left Gaza.
He said a deal would be "difficult" but not impossible.
On the ongoing efforts to end the war in Gaza, Lord Cameron said a pause in the fighting was needed now and there were "hopeful signs" about the negotiations under way.
"There is a path that we can now see opening up where we really can make progress, not just in ending the conflict, but progress in finding a political solution that can mean peace for years rather than peace for months," he said.
The real challenge would be to "turn that pause into a sustainable ceasefire without a return to the fighting, he said.
"That is the prize we should be looking for, and more than that, not just how you go from pause to sustainable ceasefire, but how you go from there to a set of political moves and arrangements that could start to deliver the longer term political solution," Lord Cameron said.
"Although it is incredibly difficult, although efforts in the past have failed, we cannot give up.
"If the last 30 years tells us anything, it is a story of failure.
"Ultimately it is a story of failure for Israel because yes, they had a growing economy, yes they had rising living standards, yes they invested in defence and security and walls and the rest of it, but they couldn't provide what a state most wants, what every family wants, which is security.
"And so the last 30 years has been a failure.
"And it is only by recognising that failure and recognising that true peace and progress will come when the benefits of peace and progress are greater than the benefits of returning to fighting."