Former Democratic rivals Hillary Clinton and Bernie Sanders spoke together at a Clinton campaign rally in Portsmouth, N.H., July 12. Here are key moments from their speeches. (Sarah Parnass/The Washington Post)

Bernie Sanders pledged to support presumptive Democratic presidential nominee Hillary Clinton at a boisterous but at times awkward rally here Tuesday, more than a month after Clinton effectively clinched the nomination.

“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,” the senator from Vermont said in this battleground state, where the former rivals appeared side by side on a stage in a packed high school gym.

Sanders and Clinton touted the need to come together to defeat Republican Donald Trump, and both offered effusive praise for the other — words not uttered during the bruising Democratic primaries. But their body language was stiff, and it was clear from shouts of “We love you, Bernie!” that not everyone who supported Sanders was ready to move on.

Even with a few scattered signs of discord, however, Clinton and Sanders presented a more unified portrait of the Democratic Party than Trump has been able to do with the GOP, which remains deeply fractured over the real estate mogul’s candidacy just a few days ahead of its national convention in Cleveland.

Clinton sought to emphasize unity in her speech, entering with Sanders to a Bruce Springsteen anthem that was standard at his rallies. Speaking directly to Sanders’s supporters, she welcomed them to her campaign and encouraged them to “make it your own.”

“You will always have a seat at the table when I am in the White House,” she said.

Much remains unknown about whether the political marriage between Clinton and Sanders will work. As they shook hands on their way to the stage, both were guarded by separate Secret Service teams and waved in different directions. And signs of lingering tension remained as some supporters yelled at one another and a police officer intervened to mediate a dispute in the bleachers.

The crowd was sprinkled with “Bernie for President” placards, and some of his supporters were decked out in “Bernie” T-shirts.

“I’m not going to say I’m delighted,” Brynn McDonnell, 24, a former Sanders volunteer in the audience, said when asked about the endorsement. “I think it’s a political move he has to make.”

“There are some Bernie supporters who want to go for Trump, and it’s important for people to understand that Bernie is the antithesis of Trump,” said McDonnell, who recently moved to New Hampshire from Iowa.

Although they have a common enemy in Trump, Clinton and Sanders don’t have much of a personal or professional relationship. Their chemistry Tuesday offered a marked contrast to that on display at a recent Clinton event featuring Sen. Elizabeth Warren (D-Mass.), another darling of the party’s progressive wing. While Warren punched the air to accentuate Clinton’s applause lines, both Clinton and Sanders were more tepid in their enthusiasm for each other. Clinton and Warren seemed like a tag team; Clinton and Sanders presented more simply as a joint appearance.

As Clinton spoke, Sanders stood with his hands alternately clasped behind him and in front of him, applauding politely as Clinton talked about the need to learn from the Dallas shootings and to implement her agenda items.

Although Sanders left no doubt that he would support Clinton in the fall, he also touched on his accomplishments in the primaries, noting that he had won 22 states and would be taking nearly 1,900 delegates to the convention in Philadelphia.

“Together we have begun a political revolution to transform America, and that revolution continues,” he said. “Together we will continue to fight for a government that represents all of us and not just the 1 percent.”

Sanders devoted the bulk of his speech to the issues that he fought for during the campaign, pausing to note areas where he and Clinton shared common goals.

He broke into his broadest smile of the event when Clinton referred to his vast success at soliciting campaign contributions — averaging $27 apiece — via the Internet.

“We accept $27 donations, too, you know,” she told the crowd.

The rally began with two Sanders supporters speaking: environmental leader Bill McKibben and Jim Dean, the leader of Democracy for America, a grass-roots group that endorsed Sanders in the primaries.

Dean announced that his group will now support Clinton.

McKibben touted Sanders’s appeal to young voters and said he hopes the Democratic Party will “not disappoint them” going forward.

“Secretary Clinton, we wish you Godspeed in the fight that now looms,” McKibben said.

Although Clinton is the presumed nominee, aides said Sanders has no plans to suspend his campaign or formally exit the race before the convention two weeks from now in Philadelphia, but he is giving up his Secret Service protection.

Sanders’s decision to keep his campaign alive has alienated many Democrats, who thought the senator should have been more gracious in accepting defeat after a grueling nominating process. But it may have given him more leverage to push for changes to the party platform.

Just in the past week, Clinton agreed to push policies on free college tuition and expanded access to health insurance that reflect positions Sanders championed during the primaries. And Sanders has claimed major wins such as support for a $15 federal minimum wage and measures to combat climate change.

The joint appearance here was greeted with a news release from the Trump campaign highlighting the “top five reasons Sanders supporters will never be excited about Hillary Clinton.”

One of them was her past support for international trade deals, which Sanders repeatedly criticized during the primaries. Trump has tried to reach out to Sanders’s supporters on that issue, particularly those in the Rust Belt, where thousands of manufacturing jobs have been shed.

It remains to be seen how active Sanders will be on the campaign trail for Clinton — and how much he can do on her behalf.

Sanders supporters had begun consolidating around Clinton’s candidacy after she all but secured the nomination in May, according to Washington Post-ABC News polling.

Before then, 71 percent of Democratic-leaning Sanders voters supported Clinton against Trump in a two-way matchup. The number rose to 81 percent in June — larger than the share of 2008 Clinton backers who supported Barack Obama at a similar point that year.

Although only 8 percent of Sanders voters said they support Trump, the latest poll found that third-party candidates pose a risk to Clinton. In a four-way matchup, 11 percent of Sanders Democrats said they would back Green Party candidate Jill Stein and 8 percent would back Gary Johnson of the Libertarian Party, dragging Clinton’s support down to 65 percent.

Aides to the two candidates have discussed sending Sanders to states where he performed well in the primaries, including Michigan and Wisconsin. New Hampshire also fits that category; Sanders defeated Clinton here by 22 percentage points in the February primary.

As of Tuesday, aides to both Sanders and Clinton said there are no concrete plans for the senator to campaign on Clinton’s behalf.

Read more:

Donald Trump vs. Hillary Clinton on the issues

Donald Trump will make his mind up on VP pick in ‘next three to four days’

Most Americans disapprove of FBI decision to exonerate Hillary Clinton