DURING eight years in which a glacial chill fell on relations between the administration of Barack Obama and a series of right-wing Israeli governments, American officials talked of Israel’s prime minister, Binyamin Netanyahu, as a political coward unwilling to stand up to zealots on his own side.

The contrast to that scorn was rather striking as Mr Netanyahu arrived at the White House on February 15th for his first official visit to a White House run by Donald Trump. True, Mr Trump urged Israel to show some restraint, telling his guest at a press conference to “hold back” on building Jewish settlements on territories occupied by Israel in 1967 “for a little bit”, pending peace talks that the new president said should be widened to include Arab states. But such admonishments are tiny—and could easily have been scripted by aides to Mr Netanyahu. For the prime minister likes to cite American sensitivities to the expansion of settlements—and what he calls his unrivalled ability to navigate them—as a way to face down hardliners in his coalition who would have him disavow any prospects for Palestinian statehood, or annex bits of the West Bank.

In a subtle but important shift, the Republican ditched a long-standing, bipartisan American insistence that peace can be reached only through the establishment of a sovereign Palestinian state alongside the Jewish one. Mr Trump signalled that America would defer to local opinion, saying: “So I’m looking at two-state and one-state, and I like the one that both partieslike...I can live with either one.” That presidential statement all but ends the diplomatic fiction that all sides are committed to a two-state process, and puts the onus on Israel to decide what should happen to the occupied territories.

Mr Netanyahu has repeatedly said he is willing to negotiate over the establishment of a Palestinian state “without preconditions”. But he insisted on two long-held “prerequisites of peace”: Palestine would have to recognise Israel as a Jewish state and Israel would have to “retain the overriding security control over the entire area”.

The visiting Israeli leader had to offer some concessions. Mr Trump had campaigned on a promise to move the American embassy to Jerusalem from Tel Aviv. But since taking office the president has been warned by foreign allies that taking such a symbolic step in a city claimed by both peoples as their capital would risk a backlash, and even violence. In his White House press conference Mr Trump said he was looking at the embassy move “very, very strongly”.

On this visit Mr Netanyahu backed away, gingerly, from his previous demand that America tear up a deal brokered by the Obama administration and other world powers to curb Iran’s nuclear ambitions. Mr Trump calls the nuclear pact “one of the worst deals” he has seen. But foreign allies and members of Team Trump, such as the defence secretary, James Mattis, have told the president that the deal is the least bad option for slowing Iran’s nuclear programme, as long as America enforces its terms more strictly and is willing to sanction Iran for other infractions in such areas as ballistic missile technology. The Israeli leader contented himself with praising Mr Trump for taking a tougher line on Iranian “aggression”.

Mr Netanyahu also faces the fact that Mr Trump’s priority in foreign policy is destroying the Sunni Muslim fanatics of Islamic State (IS)—a goal that matters less urgently to Israel than containing Iran, the largest power in the Shia Muslim world. Given that Iran is itself fighting IS in Syria and Iraq, the two goals could even be in conflict, notes Robert Satloff, the executive director of the Washington Institute for Near East Policy, an American think-tank. He asks: “How do you destroy IS without empowering Iran?”

The Israeli prime minister fudged the distinction, denouncing both IS and Iran in the same attack on “militant Islam” and hailing Mr Trump’s “great courage” in tackling “radical Islamic terror”. Quite a change since his last White House visit.