The friendship between President Trump and Israeli Prime Minister Benjamin Netanyahu has been firm and unshakable so far. But the circumstances of Netanyahu’s reelection this week, and the likely details of Trump’s forthcoming peace plan, may seriously test those bonds.

Netanyahu won a fifth term as prime minister, thanks largely to his embrace of Israeli nationalism. He has always campaigned on a security-first platform, castigating his foes as willing to compromise Israeli safety in exchange for Arab promises and international applause. He did that again, but this time he added more overt claims of Israeli sovereignty with regards to the West Bank, which his most nationalist supporters call Judea and Samaria.

There are now more than 400,000 Jewish settlers in West Bank settlements, with another 200,000 or so in East Jerusalem. This is slightly less than 10 percent of the total number of Israeli Jews, and they overwhelmingly support parties in the nationalist-religious bloc that backs Netanyahu. Moreover, they most frequently back the most religious or the most nationalist of those parties. Without their near-unanimous support, Netanyahu would have to turn to the center to remain prime minister — and the centrist party, Blue and White, ran as an anti-Netanyahu vehicle for otherwise disparate figures and movements.

Netanyahu pulled out all the stops to attract these voters. He brokered an electoral alliance between an ultranationalist party, Jewish Power, and two other, slightly less-extreme nationalist parties to create the Union of Right-Wing Parties. He even gave a member of that alliance a slot on his own party’s ticket to cement the alliance. The Union received five seats in the election, plus the one on the Likud list. They will be a central part of any coalition Netanyahu forms, and they unequivocally rule out the creation of any Palestinian state.

Netanyahu also took a step in the final days of the campaign that, on its own, could sabotage any peace plan. Settlers have long wanted to see all of the West Bank annexed into Israel without giving the Palestinians automatic Israeli citizenship. Netanyahu endorsed part of that ideal, saying he wanted to incorporate Israeli settlements into Israel proper. He also said he would not uproot one settler from the West Bank. Neither pronouncement is conducive to a settlement with the Palestinians.

The key here is understanding what they do to the idea of a territorially contiguous Palestinian state. Palestinian-controlled cities are currently separated by strategically placed Israeli settlements and Israeli-controlled roads. While Netanyahu’s statements would nominally maintain Palestinian control over the regions for which they currently exercise total or partial jurisdiction, the locations of these settlements make any formation of a contiguous state impossible. Palestinians might be in charge of their own cities, but they would be permitted no significant armed forces and have no ability to travel between their cities without crossing into Israeli-controlled territory. They are certain to not accept any such plan that leaves them fractured and dependent upon Israeli goodwill.

Those claims, and Netanyahu’s reliance on religious and nationalist parties like the Union, will have serious consequences for the Trump-Netanyahu relationship because the Trump administration’s long-expected peace plan, which is expected to land as early as this month, is likely to include some proposal for a contiguous Palestinian state. Indeed, a report that received much play in the Israeli press claimed that the plan would propose a series of land swaps not just between Israel and the Palestinians but also with Jordan and Saudi Arabia to bring such a state into being. While this specific report has been denied, it points to the tensions between the requirements of Israeli and Palestinian nationalism.

Trump has given Netanyahu many gifts, unlike any other world leader. Some might argue that the president’s withdrawal from the Iran nuclear agreement is in our direct national interest, but it is certainly something Netanyahu greatly desired. As was movement of the U.S. Embassy to Jerusalem, which was not so clearly in our interest, even if presidents had previously promised to do the same. And Trump’s gratuitous recognition of Israeli annexation of the Golan Heights, made on the eve of the Israeli election, was nothing short of a mitzvah to his friend.

We know one thing about Trump: He may give gifts, but he always expects to be repaid. Netanyahu will have to tread very carefully in reacting to any Trump deal that involves the creation of a serious, contiguous Palestinian state. Implying that he might accept would curry favor with Trump but break faith with his voters. Rejecting it out of hand would delight his backers but could potentially enrage Trump. Dally too long in indecision or negotiation, and he could exasperate both. But the relationship with the mercurial Trump might be especially endangered.

Of course, if the plan does not include a path to a serious Palestinian state, or if the issue doesn’t matter very much to Trump, such a strained relationship may not come to pass. But if it matters to Trump, and does include such a path, Netanyahu could quickly discover what others in Trump’s orbit have learned the hard way: Loyalty is always expected, and it flows in only one direction. How Netanyahu deals with such a deadly choice could determine the course of U.S.-Israeli relations and domestic Israeli politics for years to come.

Read more: