Bernie Sanders, whose calls for a "political revolution" energized millions of voters across the nation, offered a long-awaited endorsement of his Democratic rival Hillary Clinton Tuesday, calling for unity just two weeks shy of the Democratic National Convention.

Standing alongside one another at an event in Portsmouth, N.H., Sanders, a self-described democratic socialist, congratulated Clinton for winning the nomination and vowed to do everything he can to help her beat presumptive Republican nominee Donald Trump.

"It is no secret that Hillary Clinton and I disagree on a number of issues — that's what this campaign has been about," Sanders said.

"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. "Our job now is to see that platform implemented by a Democratic Senate, a Democratic House and a Hillary Clinton president — and I am going to do everything I can to make that happen."

Democrats have coalesced around Clinton's candidacy since she defeated Sanders in primaries last month in California and five other states, led by endorsements from President Barack Obama, Vice-President Joe Biden and others.

Sanders has spent the past month seeking to influence the party's platform at the Philadelphia convention and promote electoral reforms including allowing independents to participate in future primaries. The platform includes many of his proposals, including a $15 an hour minimum wage, tougher restrictions on Wall Street and an end to the death penalty.

Following the senator's speech, the two former rivals embraced one another, Clinton then taking to the microphone to welcome "friends, old and new." She echoed her campaign slogan, telling the crowd "we are stronger together."

The event at a Portsmouth high school sought to project Democratic unity before Republicans formally nominate Trump next week in Cleveland but some Sanders supporters in the crowd did not appear to be ready to move on.

Bernie Sanders, who has lost most of his leverage, has totally sold out to Crooked Hillary Clinton. He will endorse her today - fans angry! —@realDonaldTrump

Chants of "Bernie" broke out in the gymnasium while opening speakers addressed the crowd, prompting Clinton's faithful to chant, "Unity." When Senator Jeanne Shaheen, a Clinton supporter, told the audience, "We need to elect Hillary," some Bernie supporters stood and shouted, "No," which was followed by chants of "Hillary" in the crowd.

"It's like he's giving up if he endorses her," said Steve Rand, a hardware store owner from Plymouth, New Hampshire, before the two candidates took the stage. He added: "She stands for everything that I am against."

The Vermont senator saw his longshot bid for the White House quickly catch fire in 2015 at large-scale rallies where he denounced income inequality, the influence of Wall Street and the role of big money in politics — all part of a system he described as "rigged."

Sanders was powered by an impressive online fundraising machine that raised more than $200 million and threatened Clinton's once overwhelming lead in the Democratic primaries with the help of college students, independents and white voters drawn to his anti-establishment message. His endorsement could help bring some of those supporters into the fold for Clinton as she faces Republican Donald Trump.

"In these stressful times for our country, this election must be about bringing our people together, not dividing us up," Sanders said. "While Donald Trump is busy insulting Mexicans, Muslims, women, African-Americans and veterans, Hillary Clinton understands that our diversity is one of our greatest strengths."

Trump, who previously said Sanders has been "treated terribly by the Democrats" and should have run as an independent, wasted no time going after the Vermont senator.

"Bernie Sanders, who has lost most of his leverage, has totally sold out to Crooked Hillary Clinton," Trump wrote Tuesday as part of a series of Tweets ahead of the Portsmouth event. "Sanders was not true to himself and his supporters."