Israeli Prime Minister Benjamin Netanyahu is the rare U.S. ally who gloried in President Trump’s unconventional turn as the leader of the free world, collecting political goodies and boasting of his open line to the Oval Office.

That means President-elect Joe Biden holds the cards as he attempts to reset the terms of one of the most important American relationships abroad and confront Netanyahu over old grievances such as U.S. engagement with Iran and Israeli settlements on Palestinian land, people advising Biden and other Middle East experts said.

For Netanyahu, Biden’s election takes him down a peg.

“Biden and his team know very well what it means for Bibi to say, ‘I talked to the president today.’ And they know what it can mean when he isn’t able to get through,” said Netanyahu biographer Anshel Pfeffer, using Netanyahu’s nickname. “They will be the directors of this play.”

Biden has said he will not revisit some of Trump’s actions, including the relocation of the U.S. Embassy to Jerusalem. He also has endorsed deals normalizing relations between Israel and three Arab states that were negotiated with help from the Trump administration.

“Not every single thing that President Trump has done in Israel is going to automatically be something that is opposed by the Biden administration,” said Michael Koplow, policy director at the Israel Policy Forum.

It may help that Biden, 77, and Netanyahu, 71, have known one another for most of their political lives, through Biden’s decades-long Senate tenure and eight years as vice president and Netanyahu’s first stint as prime minister in the late 1990s.

“It’s true that Netanyahu has known Joe Biden for nearly 40 years,” former U.S. ambassador to Israel Martin Indyk tweeted after the election. “But it’s also true that Joe Biden has known Netanyahu for nearly 40 years.”

For example, Biden knows Netanyahu well enough to understand how important White House access is to the prime minister. He has presented his pipeline to Trump as one of his key assets during three Israeli elections over the last two years. And he has presented himself to other world leaders, including Prime Ministers Narendra Modi of India and Viktor Orban of Hungary, as a channel to the Oval Office for their own issues.

Netanyahu is already pivoting to embrace Biden and spin his own comedown from his perch as Trump’s most-favored ally.

“Joe, we’ve had a long & warm personal relationship for nearly 40 years, and I know you as a great friend of Israel,” Netanyahu wrote Sunday on Twitter.

He congratulated Biden and Vice President-elect Kamala D. Harris without specifying what he was congratulating them for. “I look forward to working with both of you to further strengthen the special alliance between the U.S. and Israel.”

Netanyahu also immediately tweeted warmly about Trump, who has not conceded defeat.

“For myself and for all citizens of the State of Israel, I again thank President @realDonaldTrump for the great friendship he showed the State of Israel and me personally,” Netanyahu wrote.

The tweets came some 12 hours after Biden’s victory in Pennsylvania ensured he will be the 46th president. Numerous other world leaders were quicker to congratulate Biden, and the delay has led to speculation that Netanyahu was trying to spare Trump’s feelings.

Trump was visibly annoyed last month when Netanyahu appeared to hedge his bets about the then-upcoming U.S. election.

“Do you think Sleepy Joe could have made this deal, Bibi, Sleepy Joe?” Trump asked as reporters listened in on an Oct. 23 Oval Office phone call among Trump, Netanyahu and Sudanese leaders.

There was an unusual pause before Netanyahu answered.

“Uh, well, Mr. President, one thing I can tell you is we appreciate the help for peace from anyone in America,” he managed eventually. “And we appreciate what you’ve done enormously.”

“Yeah,” Trump said, before quickly moving on.

Netanyahu and Biden have not spoken since the Nov. 3 election and the declaration four days later that Biden had won. Such a call is expected soon, despite sensitivity on Biden’s end that he not be seen as governing before he takes office in January and on Netanyahu’s that he not anger Trump.

For Biden, the goal at the outset will be to reassure Netanyahu of his steady support for Israel while managing expectations, people who have spoken with him said. Those people spoke on the condition of anonymity because they were not authorized to speak on the record.

Netanyahu broke bitterly with President Barack Obama over the 2015 international nuclear deal with Iran that was brokered with the support of Biden, then vice president. The U.S. withdrawal from the deal under Trump was a diplomatic coup for Netanyahu, who thanked Trump for it each time they appeared in public.

Biden’s election revisits the nadir of the modern relationship between the two countries, when Netanyahu went around the White House and encouraged opposition to the deal in Congress and among the American public.

“They have two very different approaches, and Bibi is going to oppose him” over Iran, said Indyk, now a Middle East expert at the Council on Foreign Relations. “That is going to come up early on, and clearly that is going to determine the relationship far more than the question of how to deal with Bibi when he calls every other day and demands that the United States do this or that, which is what he does — very needy.”

Biden has said he intends to rejoin the nuclear deal, conditioned on Iran’s compliance with its terms. That effectively would mean that the Biden administration, like the Obama administration, will prioritize alliances with European partners who helped drive the deal over Israeli objections.

Some former officials who know both men suggested they might paper over some of their differences on Iran by focusing on Biden’s goal of strengthening or superseding the 2015 deal to address many of Israel’s complaints.

“A much larger, stronger deal can be a shared goal,” said a former senior U.S. official, who spoke on the condition of anonymity to speak frankly. “The interim steps on the way to that goal are certainly things the U.S. and Israel are going to have to talk about, but having a shared strategic objective is one” possible way to patch things up.

Biden visited Israel in 2016, the year after Netanyahu blindsided the Obama administration by accepting a House GOP invitation to address Congress. The then-vice president didn’t mince words in a private meeting with Netanyahu, and the episode cleared the air, current and former U.S. and Israeli officials familiar with it said.

“That meeting was characterized by friendly and very frank conversations. So it is not as if, starting in 2021, they have to have their first conversation post the moment of disagreement,” said the former senior U.S. official.

Middle East experts doubt the Biden administration will move quickly to try to broker talks between Israel and the Palestinians, who had walked away from Trump peace efforts less than a year into Trump’s presidency.

Even absent a peace initiative, Biden is still likely to confront Netanyahu over Jewish settlements on land Palestinians claim for a future state, a sore spot from the beginning of the Obama administration.

Biden is also expected to reverse Trump policies seen as punitive, such as a cutoff in humanitarian aid in the West Bank and Gaza Strip. He is likely to try to reopen the Palestinian consulate in Washington, a harder task, and to reestablish diplomatic ties with the Palestinian government in the West Bank.

“The relationship with the Palestinians right now is probably at its lowest point,” said Koplow, whose organization seeks a two-state solution to the decades-old Israeli-Palestinian conflict.

Biden can afford to let bygones be bygones, as close advisers say he intends to do. But he isn’t likely to forget the slights of the Obama era, including one in which he was directly involved.

On March 9, 2010, Michael Oren, then Israel’s ambassador to the United States, was in Netanyahu’s motorcade pulling into the underground garage of Jerusalem’s David Citadel hotel, en route to meet Biden.

As they got out of their cars, his American counterpart, U.S. ambassador Daniel Shapiro, rushed toward him, brandishing a BlackBerry that bore news that Israeli officials had approved 1,600 new housing units in an ultra-Orthodox settlement community of East Jerusalem, against U.S. wishes.

Oren and other officials familiar with the episode said Netanyahu had been blindsided by a minister from an ultra-Orthodox party in the prime minister’s coalition.

“Netanyahu was furious,” Oren said.

And so was Biden, who considered leaving immediately and then kept Netanyahu waiting more than an hour while the Americans crafted a response condemning the project, participants and others with knowledge of the episode said.

Oren said the dust-up would have been even more damaging if not for the vice president’s existing relationship with the prime minister and his underlying support for Israel, which considered Biden a friendlier interlocutor than Obama or others in his White House.

“He wasn’t happy about it, but by the time I went with him to the airport, he was ready to put it behind us,” Oren said. “There was a little bit of a good-cop, bad-cop situation with Biden and Obama.”

Netanyahu remains angry, however, over the Obama administration’s highly unusual decision to allow a U.N. Security Council resolution condemning Israeli settlements to pass in December 2016, as Trump prepared to take office. Standard U.S. practice has been to veto such measures.

Trump used that vote as a rallying cry against the Obama policies toward Israel. He has since had a new settlement named for him — Trump Heights — shortly after greenlighting Israel’s annexation of the Golan Heights in a reversal of U.S. policy.

Biden has not been clear about whether he would formally endorse the Golan Heights annexation, but he is not expected to contest it.

Trump last month approved a change in U.S. spending in some settlement areas that Biden could not undo without Israel’s agreement, and the Trump administration is now working with Israel to impose additional international sanctions on Iran.

But the efforts seem last-ditch, and despite Trump’s claim that Biden is not the legitimate victor in the recent election, both U.S. and Israeli officials are preparing for the shift to come.

Netanyahu and his political allies in Israel may “have gotten a little punch-drunk during four years of Trump,” said Shalom Lipner, an Atlantic Council fellow who served as an official under several Israeli prime ministers. “I think he knows now that if you stay in your lane, you won’t get in trouble.”

Hendrix reported from Jerusalem. Shira Rubin in Tel Aviv contributed to this report.