During a visit to his Mar-a-Lago resort in March, President Donald Trump approached legal scholar Alan Dershowitz to talk about the Middle East.
While Trump questioned Dershowitz, a confidant of Israeli Prime Minister Benjamin Netanyahu, about the region, the president seemed certain about one thing: where he stood on the U.S. Embassy in Israel.
"What he said to me was, 'I'm going to do it. Every other president has promised, and all of them didn't keep their promises,' " Dershowitz said, referring to a controversial proposal to move the embassy from Tel Aviv to Jerusalem. "He said there would be criticism of him, but that he wanted to keep his promise."
In the weeks leading up to his announcement Wednesday recognizing Jerusalem as the capital of Israel, reversing decades of U.S. policy, Trump heard entreaties for and against the proposed move from a host of advisers inside and outside the White House.
The decision to shake off warnings from senior officials such as Secretary of State Rex Tillerson and align himself instead with prominent proponents of the move, including Vice President Mike Pence and major donor Sheldon Adelson, underscored the president's determination to break with past policy and keep a key campaign pledge - despite the potential risks to U.S. interests in the region and the goal of Middle East peace.
Announcing his decision at the White House, Trump said that an eventual embassy move to Jerusalem would protect American interests. Most important, he said, it would acknowledge the "obvious" reality that Israelis have made Jerusalem their political seat, despite the Palestinians' hope to someday claim East Jerusalem as their own capital.
"Today, I am delivering," he said.
For two decades, U.S. presidents had promised to do what Trump did Wednesday, but they ultimately issued repeated waivers to a law requiring relocation of the embassy. They said they were postponing the issue in hopes that it could be addressed in an eventual Israeli-Palestinian peace deal.
This summer, Trump "made clear that he wasn't thrilled" when he signed a waiver of his own, according to a senior administration official said who, like others, spoke on the condition of anonymity to discuss internal deliberations. That decision was made with advice from the State and Defense departments. At the time, an initiative to forge a new Israeli-Arab peace deal, led by White House aides Jared Kushner and Jason Greenblatt, was just getting underway.
At that point, "Jason and Jared convinced him that they were just at the beginning of building relationships" in the region and that "if we do this now, we won't have any relationships to fall back on," the official said.
That decision reset the clock to the next twice-yearly waiver deadline, which fell this week.
Within the administration, key voices of support came from Pence, Kushner and Nikki Haley, Trump's ambassador at the United Nations.
Kushner, the president's son-in-law, had supported the move from early in Trump's candidacy, and Pence, who is to visit Israel this month, told Trump that his base would love the decision, something the president liked to hear.
An important outside voice advising Trump to make the leap was Adelson's, according to several people familiar with the two men's conversations. At a White House dinner earlier this year, Adelson made the issue a main topic, one person said. In the months that followed, Adelson periodically asked others close to Trump what was causing the delay and expressed frustration, these people said.
At the same time, other Trump advisers were making their case against the move. Most prominent among them were Tillerson and Defense Secretary Jim Mattis.
Tillerson, mindful of the death of four Americans in militant attacks in Benghazi, Libya, in 2012, "pushed back vocally," one White House official said. Already at odds with Trump over other aspects of the president's approach to the Middle East, Tillerson argued that the move could unleash a dangerous chain reaction across the region.
R.C. Hammond, a Tillerson adviser, said Tillerson and Mattis requested time to evaluate U.S. outposts and fortify them if necessary.
Some outside confidants, including billionaire Tom Barrack, urged Trump to hold off, worried that the move would deepen regional tensions caused by Saudi Arabia's political shake-up and Iran's growing reach.
"It's insane. We're all resistant," said one Trump confidant who spoke to president recently about it. "He doesn't realize what all he could trigger by doing this."
While Trump appeared to have made up his mind, he continued to solicit input, two White House officials said, even asking random acquaintances about the Middle East in recent months.
Several advisers said he did not seem to have a full understanding of the issue and instead appeared to be focused on "seeming pro-Israel," in the words of one, and "making a deal," in the words of another.
Once Trump indicated 10 days ago that he would not sign a second waiver, national security adviser H.R. McMaster began putting together options that officials assessed would result in the least damage.
The debate came to a head at a White House meeting Nov. 27 to hash out the waiver issue. According to people briefed on the meeting, Trump repeated his earlier assertions that he had to follow through on his campaign pledge, seemingly irritated by objections over security and the break with previous policy.
"The decision wasn't driven by the peace process," one senior official said. "The decision was driven by his campaign promise."
Chief regional allies including Saudi Arabia, Jordan and Egypt - where senior government officials have said they still have little sense of the parameters of the broader peace plan being fashioned the Kushner-led team - were not told definitively that the decision had been made until late last week. All have described the Jerusalem decision as a step backward in the peace process.
When Trump made contact with Arab allies ahead of his announcement, it was to notify them, not to discuss the matter.
Trump also notified Jordanian King Abdullah II, a stalwart ally, in a similar call. "It was a one-sided conversation, with the president saying, 'This is what we are going to do,' " said a Washington-based official briefed on details of the call. Trump said his administration was still pushing forward on a peace deal but gave no details.
In the wake of Wednesday's statement, U.S. officials say they expect a cooling-off period with the Palestinians before any discussion of the peace process can resume. But they are betting that Abbas's team cannot afford to walk away, and Kushner, in particular, is trying to assure others that a deal is still possible. White House officials say a key test will come later this month: whether Abbas cancels his planned meeting with Pence.
Even officials with misgivings sought to look on the bright side Wednesday, saying that Trump's statement did nothing to change any of the components being considered by the administration as parts of a comprehensive peace agreement.
They repeatedly emphasized what had not changed after the president's announcement, rather than what had. Trump's statement, according to several officials, was carefully constructed not to touch on any of the "final-status" issues of an Israeli-Palestinian peace, including the possibility of two states, with borders yet to be determined, and a Palestinian capital in East Jerusalem. Kushner and his team are expected to continue forming their plan - which officials say is now more than just a blueprint.
The president provided a preview of this week's decision to major donors last weekend at a fundraiser at the Manhattan home of Blackstone chief executive Steven Schwarzman. After being showered with praise by billionaire Ronald Lauder for being more pro-Israel than past presidents, Trump promised that within days he would declare Jerusalem the capital and begin the process of moving the embassy.
When another donor criticized the timing of the decision, Trump seemed taken aback.
"No, this is important to do now," Trump said, according to someone who attended the event. "This has gone on long enough. Other presidents have put it off, put it off. We're not going to put it off."
He added that building an embassy in Jerusalem might take three or four years.
The Washington Post's Carol Morello in Vienna, Anne Gearan in Berlin and Joby Warrick in Washington contributed to this report.