Sen. Bernie Sanders (I-Vt.) is expected to formally endorse presumptive Democratic presidential nominee Hillary Clinton, potentially ending tensions between the two and easing the concerns of party leaders hoping for a united front ahead of the nominating convention later this month.

The endorsement is expected to occur next Tuesday, when Sanders and Clinton will appear together at a rally in New Hampshire, Democratic sources first told NBC News on Wednesday.

Sanders all but confirmed that he would endorse Clinton in an interview with Bloomberg on Thursday.

“We have got to do everything that we can to defeat Donald Trump and elect Hillary Clinton,” he said, adding that “I don’t honestly know how we would survive four years of a Donald Trump [as president].”

After repeatedly pledging to continue his campaign until the convention, the Vermont senator has appeared increasingly open to backing Clinton in recent weeks.

He affirmed in June that he would vote for Clinton, and promised to “do everything I can to defeat” presumptive Republican presidential nominee Donald Trump. But his campaign insisted Sanders didn’t mean the comments as a formal endorsement of Clinton.

Chief among Sanders’ concerns was whether Clinton and the Democratic Party would embrace the progressive policy agenda that was central to his presidential campaign. While he succeeded in getting some of his policy proposals into the party’s platform, which will be adopted at the convention, Sanders said that he would continue his fight.

“I hope very much that Secretary Clinton understands that not only is it good public policy, it’s the right thing to do,” he said in June. “It is good politics to begin to move in that direction.”

Vice President Joe Biden foreshadowed Sanders’ eventual endorsement, telling NPR on June 30 that Sanders had told him he’d back Clinton.

VP Biden in sit down interview with us just now: "I've talked to Bernie. Bernie is going to endorse her." @NPRWeekend — Rachel Martin (@rachelnpr) June 30, 2016

Sanders, however, told MSNBC’s Chris Hayes later that evening that he had met with Biden “about three weeks ago,” and stressed that he was not prepared to endorse Clinton yet.

“My hope is that we can reach an agreement on some very important issues, and I can go forward to the millions of people who supported me and say, ‘Look, this is the progress we’ve made. This is where we’re going to go as a country,’” Sanders said. “So I hope it happens. As of this moment, we’re not there quite yet.”

Sanders’ pending endorsement caps a prolonged primary campaign during which Sanders and his supporters often ruffled feathers, accusing Democratic officials of rigging the primary process in favor of Clinton. The party scheduled several of the debates on weekends, when voters were less likely to watch.

Brian Snyder / Reuters Clinton and Sanders at a debate in New York in April.

Sanders acknowledged that some of his supporters may have gone too far in May, when they unleashed violent attacks during protests of the party’s delegate system.

In early June, after Clinton reached the number of delegates required to win the nomination, Sanders pledged to continue his campaign, and shifted his focus to demanding reforms within the party and advocating for Clinton to adopt more progressive policy positions.

Sanders’ influence is clearly evident in the draft of the party’s platform, which contains some of his signature campaign ideas, such as a $15 minimum wage and language like “a rigged economy.”

In addition, Clinton on Wednesday unveiled a plan for debt-free college, another one of Sanders’ policy proposals. Her campaign said it was a direct result of conversations between her and the Vermont senator.

Still unresolved are issues such as trade and climate change. Sanders wants Clinton and Democratic officials to more forcefully oppose the Trans-Pacific Partnership and advocate a ban on fracking.

Because of Sanders’ initial reluctance to drop out and cede the race to Clinton, party officials were concerned Sanders’ supporters may not unite around her, jeopardizing her chances in the general election. Recent polls, however, show that many of those who backed Sanders are slowly coming around, and his formal endorsement next week may further seal the deal.

“At the end of the day, we’re going to be united,” Sanders said Thursday.