He promised total victory for Israel, but standing next to Donald Trump at the White House on Monday, it was Benjamin Netanyahu who looked defeated.

Israel's prime minister was saying all the right things about the peace deal he had just agreed to, but he seemed deflated, his voice hoarse and his energy dimmed, as he praised Trump as 'the greatest friend Israel has ever had in the White House'.

It is a friendship that could cost him his government.

Netanyahu's far-right allies have threatened to leave – and possibly collapse – his government if he makes too many concessions in ending the war. Coalition partners like Bezalel Smotrich and Itamar Ben-Gvir have made little secret of their desire to annex Gaza, drive out Palestinians and re-establish Jewish settlements there.

They – and Netanyahu – have been implacably opposed to any role for the Palestinian Authority in Gaza, and any pathway to a Palestinian State. The deal Netanyahu has now agreed to outlines both, though with heavy caveats.

Trump knows that by pushing the Israeli prime minister into this deal, he is asking him to risk his government. In return, he is dangling the prospect of a historic legacy – a new, more peaceful future for the region, and new ties between Israel and its Arab neighbours.

There were signs, even before Netanyahu left for Washington, that he knew this choice was coming.

Israel's president, Isaac Herzog, told an Israeli radio station that he was considering pardoning Netanyahu in the corruption cases he is currently facing in court. These trials are one reason, his critics allege, that he is reluctant to leave office and face the judges without the shield of his national duties, power and profile.

His first response to his countrymen today has been to publicly emphasise that he did not, in fact, agree to a Palestinian state.

Reports in the Israeli media this morning also suggest that Israel's cabinet will not get to vote on the full terms of the deal – but only on the exchange of Israeli hostages for Palestinian prisoners.

The potential continuation of the war was something he emphasised in that uncomfortable press conference in Washington, underlining – with Trump's backing – that Israel would have free reign to 'finish the job' if Hamas failed to deliver on its side of the deal.

Netanyahu is known as a master of political manoeuvres, threading a path between political roadblocks to buy time. He has shifted position through previous rounds of negotiations but it is hard to maintain that uncompromising image of 'total victory' when you have publicly conceded to the very things you have spent a career preventing, and when you are waiting for your enemy's response.

For the first time since the war began, it seems that the consequences of avoiding this deal were worse than the consequences of agreeing to it.