Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Bernie Sanders officially endorsed Hillary Clinton on Tuesday, capping off a contentious presidential primary and solidifying the former secretary of state's hold on the Democratic Party.

“I have come here to make it as clear as possible as to why I am endorsing Hillary Clinton,” Sanders said while standing next to Clinton at an event in Portsmouth, New Hampshire.

“This campaign is not really about Hillary Clinton or Donald Trump or Bernie Sanders. This campaign is about the needs of the American people and addressing the very serious crises that we face,” Sanders said. “And there is no doubt in my mind that as we head into November, Hillary Clinton is far and away the best candidate to do that.”

Sanders did not formally suspend his campaign, however, for procedural reasons related to the upcoming Democratic National Convention. When he first took to the stage, Sanders touted the success of his campaign, noting that he garnered 1,900 delegates during the primaries — “far more than almost anyone thought we could win,” Sanders said.

But Sanders conceded, “Secretary Clinton goes into the convention with 389 more pledged delegates than we have and a lot more super delegates.”

“Secretary Clinton has won the democratic nominating process. And I congratulate her for that,” Sanders said to a cheering crowd in a city and state he won by wide margins.“She 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.”

Our job now is to see our progressive platform implemented by a Democratic Senate, a Democratic House and a Hillary Clinton presidency. — Bernie Sanders (@BernieSanders) July 12, 2016

The event will help to fuse two wings of the Democratic party together that, despite their real differences, seem to be closer together than their counterparts across the aisle. Many of Trump’s primary challengers have yet to endorse him.

Sanders attacked Trump several times during his speech, comparing the Republican candidate’s stances to Clinton’s.

“While Donald Trump is busy insulting Mexicans and Muslims and women and African Americans and our veterans, Hillary Clinton understands that our diversity is one of our greatest strengths,” Sanders said.

But he didn’t shy away from noting the dissension that surfaced between himself and Clinton during the primaries.

“It is no secret that Hillary Clinton and I disagree on a number of issues, that is what this campaign has been about,” Sanders said. “This is what democracy is about.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“There was a significant coming together between the two campaigns and we produced by far the most progressive platform in the history of the Democratic Party," he added.

After embracing Sanders, Clinton took to the podium to thank him for endorsing her and for energizing Democratic voters during his campaign. She then focused on positions she and Sanders both champion — raising the minimum wage, helping college students avoid debt and implementing tougher restrictions on Wall Street.

Together, let’s go win this election. pic.twitter.com/lRSwpk9y4b — Hillary Clinton (@HillaryClinton) July 12, 2016

“I can’t help but reflect how much more enjoyable this election is going to be now that we are on the same side,” Clinton said. “Because you know what we are — stronger together,” she said, employing her campaign slogan.

“And now with your help, we are joining forces to defeat Donald Trump and win in November,” she said.

Trump quickly responded to the endorsement with a flurry of tweets.

“I am somewhat surprised that Bernie Sanders was not true to himself and his supporters. They are not happy that he is selling out,” one read. He left an open invitation to Sanders supporters to join his camp.

To all the Bernie voters who want to stop bad trade deals & global special interests, we welcome you with open arms. People first. — Donald J. Trump (@realDonaldTrump) July 12, 2016

Sanders’ decision to stay in the race has baffled many and alarmed others, who worry he might help Trump by fracturing the Democratic Party.

But this weekend’s meeting of the Democratic Platform Committee showed that in defying norms, Sanders notched real victories and advanced his so-called “political revolution.”

Sanders and Clinton are not particularly close, and they have not seen each other face-to-face since a private meeting at a Washington hotel last month. But they have been on the same side of political fights before.

Never as ideologically pure as his stereotype suggests, Sanders backed Clinton’s health reform plan when he was a congressman in the 1990s, even though it fell far short of his favored single-payer plan.

Sanders appeared on stage with Clinton at an event supporting the effort in Vermont. “Thanks for your commitment to real health care access for all Americans,” Clinton wrote underneath a photo of the two of them from 1993.

They overlapped in the Senate for only two years, but it was enough time to serve together on the Health Committee and team up some legislation, including successful green jobs training legislation dubbed The Sanders-Clinton amendment.

Clinton donated $10,000 to help Sanders get elected to the Senate, through a PAC. And he praised her as “one of the brightest people in Congress” when President Obama chose her to be secretary of state.

Related: Democrats Advance Most Liberal Platform Ever

But whatever relationship they had was tested during the primary as both campaigns accused the other of underhanded tactics and unfair attacks.

The tension culminated in early April, when Sanders declared of Clinton, "I don't think you are qualified” to be president. He walked back the statement, but the damage was done, and the line popped up in some of Trump’s stump speeches. And it reflected the bombs Sanders continued to lob at Clinton long after it was clear he would lose the nomination.

Since voting ended in June, Sanders has eased himself into supporting Clinton. First he acknowledged he would not be the nominee, then he said he would vote for Clinton and on Tuesday finally suggested others should too.

It’s a much longer route to unity than Clinton took in 2008, when she conceded the race just four days after Obama secured the necessary delegates.

The idea for Tuesday’s event was derivative of 2008, when Clinton and Obama appeared together for the first time after the primaries in the town of Unity, New Hampshire.

Clinton’s campaign is hoping Sanders can serve as a bridge to progressives and young people, whom Sanders consistently won with margins as high as six-to-one throughout the primary.

Related: The Latest in the Veepstakes

But his most concrete assist may come in New Hampshire, where Sanders dominated in the primary. Sanders won the Granite State by 22 percentage points, giving him the largest win in the history of the state’s Democratic primary.

That outcome rattled Clinton’s campaign, but it ended up presaging little. For the rest of the primary, Sanders found it impossible to win outside of caucus states or ones where whites made up at least 70 percent of the vote.

Unity has been slow but steady in the 34 days ago since Sanders lost the nomination. On Monday, three progressive groups that either endorsed or were sympathetic to Sanders announced support for Clinton.

“We urge progressive activists across America to support Secretary Clinton for president, join the fight to defeat Donald Trump,” the political arm of the Congressional Progressive Caucus, whose co-chairs backed Sanders, said in a statement.

Negotiations are ongoing between the Clinton and Sanders campaign about exactly what role he will play and how much he will campaign for his former rival, but Sanders has said, “I’m going to do everything I can to defeat Donald Trump.”