Sen. Bernie Sanders dropped out of the 2020 presidential race Wednesday, ending an unprecedented Democratic primary and setting up a general election between President Donald Trump and former Vice President Joe Biden.

The independent senator from Vermont announced his move in a conference call with staff, after he suffered a series of crushing primary losses and the coronavirus pandemic stalled his campaign for weeks. Speaking to supporters, he said the path to winning the Democratic presidential nomination is "virtually impossible," adding that he did not want to put effort into a doomed campaign as the outbreak rips through the country.

"I cannot in good conscience continue to mount a campaign that cannot win and which would interfere with the important work required of all of us in this difficult hour," he said in remarks livestreamed from his Vermont home.

Sanders congratulated Biden on Wednesday but did not explicitly endorse him. He called his former rival "a very decent man who I will work with to move our progressive ideas forward." The senator said he would not drop off the ballot in states with upcoming primaries and try to amass more delegates in order to influence the party's platform at its August convention.

"Then together, standing united we will go forward to defeat Donald Trump, the most dangerous president in modern American history," he said.

In a statement after Sanders left the race, Biden said his former rival has "created a movement" and "changed the dialogue in America." While he acknowledged that he and Sanders have different views on how quickly to move toward policy goals, he said he would continue dialogue with the senator and his supporters.

"I hope you will join us. You are more than welcome. You're needed," Biden said to Sanders' loyal following.

After early triumphs in the Democratic primary, Sanders failed to pull away from Biden as a field that once numbered more than 20 candidates dwindled. Sanders saw success from Iowa to New Hampshire, Nevada, Colorado and California.

But he fell behind in the national delegate race as prominent Democrats, worried that he could become their nominee and face Trump in November, coalesced around Biden. After a string of primaries in mid-March, the former vice president racked up pledged delegates and became the race's clear front-runner. Biden has racked up 1,196 delegates, versus 883 for Sanders.

Biden's push for the nomination ground to a halt in recent weeks as a string of states delayed their primaries until June to slow the pandemic's spread. Wisconsin held its primary Tuesday after a legal battle over whether to delay it, and Sanders verbally eviscerated the conservative-majority state and U.S. Supreme Courts for decisions that led to in-person voting taking place this week. The state will not report results until next week.

Sanders ran on the promise of a political "revolution" and touted his signature single-payer "Medicare for All" plan on the campaign trail. He also promised to cancel student debt and pass free universal child care — popular proposals to expand the social safety net that his rivals nonetheless criticized as unrealistic and expensive.

The senator lapped the field in fundraising with perhaps the most successful small-dollar donor operation ever. Though Sanders saw sustained success among young and Latino voters, Biden consistently won over black voters and older Democrats as he topped Sanders in a series of key states such as Texas and Michigan.

A week after his Michigan triumph, Biden crushed his rival in Florida, another delegate-heavy state.

As centrist candidates dropped out of the race to endorse Biden before and after Super Tuesday on March 3, Sanders decried an effort by the party establishment to defeat him.

After the senator left the race Wednesday, Trump continued his efforts to try to win over disillusioned supporters, many of whom do not identify with the Democratic Party. He tweeted that the "Bernie people should come to the Republican Party," apparently citing their agreement on trade protectionism.

Sanders' period as the race's front-runner followed a remarkable rebound from a heart attack last year. The oldest candidate to run for president this year, Sanders experienced "chest discomfort," during an Oct. 1 event, according to campaign advisor Jeff Weaver.

Testing revealed a "blockage in one artery" and two stents were inserted, Weaver added. Sanders missed only a small amount of time on the campaign trail.

He first vaulted to national fame with a strong 2016 primary race against Hillary Clinton. In his remarks Wednesday, Sanders said that "over the past five years, our movement has won the ideological struggle."

He cited increased support in public polls for a $15 per hour minimum wage and a single-payer health care system, among other issues he said were once considered "radical and fringe."

"In terms of health care, this current horrific crisis we are now in has exposed for all to see how absurd our current employer-based health insurance system is," he said, in highlighting how millions of people who lose their jobs because of the coronavirus outbreak will also forfeit their coverage.

Sanders promised to push forward with the movement he has propelled since the 2016 election.

"Let us go forward together, the struggle continues," he said in closing his remarks to supporters.

Subscribe to CNBC on YouTube.