It was an endorsement nearly one month in the making.

Bernie Sanders Bernie SandersNYT editorial board remembers Ginsburg: She 'will forever have two legacies' Two GOP governors urge Republicans to hold off on Supreme Court nominee Sanders knocks McConnell: He's going against Ginsburg's 'dying wishes' MORE’s vocal backing of Hillary Clinton Hillary Diane Rodham ClintonBiden leads Trump by 36 points nationally among Latinos: poll Democratic super PAC to hit Trump in battleground states over coronavirus deaths Battle lines drawn on precedent in Supreme Court fight MORE on Tuesday in Portsmouth, N.H., came after weeks of delicate conversations between the two camps, sources say.

ADVERTISEMENT

Those talks — which involved Clinton, Sanders and his wife, Jane, and top campaign officials — centered on the question of how to continue pushing the progressive agenda that both candidates touted during their long, and at times bitter, presidential primary battle.

A critical moment in the process, Clinton aides said Tuesday, was the meeting between the two candidates last month at the Washington Hilton. The talk helped to break the ice, with Sanders campaign manger Jeff Weaver and Clinton manager Robby Mook staying at the hotel for another two hours to discuss how they could bring the two sides together, including on issues like Sanders's preference for tuition-free college.

In the weeks after that initial meeting, Mook and Weaver continued the conversation in a string of calls and text messages. Last month, they had a one-on-one dinner at the Farmhouse Tap and Grill in Burlington, Vt., one Clinton aide said.

Over a burger for Weaver and a salad for Mook, they discussed issues including Sanders's college proposal. They were interrupted several times by diners asking to take selfies with Weaver, the Clinton aide said. The dinner meeting went well into the night, lasting until about 11 p.m.

Other players in the Democratic Party also got involved in the unity push. Sen. Charles Schumer Chuck SchumerRepublican senator says plans to confirm justice before election 'completely consistent with the precedent' Video of Lindsey Graham arguing against nominating a Supreme Court justice in an election year goes viral Graham signals support for confirming a Supreme Court nominee this year MORE (D-N.Y.), who is expected to become the Senate Democratic leader in the next Congress, worked the phones to bring the sides together on policy, a source said, and dined with Sanders at a Chinese restaurant on Capitol Hill recently to talk about an endorsement for Clinton, the presumptive Democratic presidential nominee.

At the same time, Clinton aides said they took pains to reach out to Sanders supporters, particularly in states where he prevailed during the primary process. Jake Sullivan, Clinton's top policy aide, flew to Washington state, while Mook met with Sanders convention delegates in Vermont and New Hampshire. Another top Clinton aide, Marlon Marshall, went to Wyoming to meet with Sanders supporters and attend the state's Democratic Party convention.

The rapprochement between the two sides included staff moves.

Marshall received suggestions and resumes from Rich Pelletier, Sander's deputy campaign manager, and several hires were made, including the national campus organizing director for Sanders, an aide who handled labor outreach, and state campaign managers in Vermont and Rhode Island.

The constant communication between the two sides led to Clinton's embrace of a Sanders-esque college tuition proposal and an announcement that she would seek $40 billion in new mandatory funding for community health centers, the aide said.

In another show of unity, Clinton policy adviser Maya Harris and a Sanders policy adviser sat side-by-side during the Democratic platform hearings in Orlando.

On Tuesday, standing next to Clinton, Sanders said Clinton "will be the Democratic nominee for president, and I intend to do everything I can to make certain she will be the next president of the United States."

While some boos were apparent in the crowd, the jeering was drowned out by a louder show of support.

Recent polls have shown that Sanders supporters have flocked to Clinton, as some Democrats predicted. And in Clinton's Brooklyn campaign headquarters, aides have said, they're glad to finally see an end to a grueling primary campaign during which Sanders picked up many more states — and delegates — than anyone predicted.

"I'm relieved it's over," one aide said on Tuesday.

After receiving the endorsement from Sanders, Clinton said she couldn't "help but reflect how much more enjoyable this election is going to be now that we are on the same side."

"We are joining forces to defeat Donald Trump Donald John TrumpBiden leads Trump by 36 points nationally among Latinos: poll Trump dismisses climate change role in fires, says Newsom needs to manage forest better Jimmy Kimmel hits Trump for rallies while hosting Emmy Awards MORE, win in November and yes, together, build a future we can all believe in," she said, incorporating Sanders's campaign slogan.