Former Vice President Joe Biden announced Friday night that he had finally clinched the 2020 Democratic presidential nomination, setting up a general election fight against President Trump amid a pandemic, an economic downturn, and widespread protests against police brutality targeting the black community.

“It was an honor to compete alongside one of the most talented groups of candidates the Democratic Party has ever fielded — and I am proud to say that we are going into this general election a united party,” Biden, 77, said in a statement. “I am going to spend every day between now and Nov. 3 fighting to earn the votes of Americans all across this great country so that, together, we can win the battle for the soul of this nation and make sure that as we rebuild our economy, everyone comes along.”

The Associated Press count has Biden at 1,993 delegates. Under Democratic National Committee rules, a majority of 1,991 delegates is required to win the nomination. The runner-up, Sen. Bernie Sanders of Vermont, had stayed on state ballots after suspending his campaign in order to help push the Democratic platform to the left. The Tuesday primaries put Biden over the top, but it took several days to tally the results.

In April, Biden agreed to Sanders keeping hundreds of delegates who would have represented him at the Democratic National Convention had he still been in the race. Under party rules, the senator was set to forfeit pledged statewide delegates because they can only be allocated proportionally based on primary results among candidates with bids afoot when they’re selected. A similar framework applied to seats on the party’s committees, which are scheduled to meet at the convention.

Now Biden can focus on Trump. “This is a difficult time in America’s history. And Donald Trump’s angry, divisive politics is no answer,” he said. “The country is crying out for leadership. Leadership that can unite us. Leadership that can bring us together.”

Biden, a senator from Delaware for 36 years and Barack Obama’s vice president for two terms from 2009 to 2017, at one point looked unlikely to be the Democratic nominee. He finished fourth in Iowa and fifth in New Hampshire, followed by a distant second place in Nevada behind Sanders.

But with the help of an overwhelming majority of black voters, Biden bounced back to win the South Carolina primary by nearly 30 percentage points. He never looked back. Biden won 10 of 14 states on Super Tuesday as the once historically large Democratic field shrank to just Sanders and the former vice president. Biden made the case that he would fare best in a general election against Trump, the incumbent Democrats desperately want to beat after Hillary Clinton’s surprise 2016 defeat at the businessman and reality TV star’s hands.

Biden did move to the Left in order to accommodate voters supporting Sanders, Massachusetts Sen. Elizabeth Warren, and other candidates. As the pandemic deepened, tens of millions of people in the United States found themselves out of work, and cities were convulsed by sometimes violent protests following the death of George Floyd, an unarmed black man, in police custody, Biden seized the lead over Trump in national and most battleground state polls. The RealClearPolitics polling average has Biden ahead of Trump by 7.1 points nationally.

Still, some battleground state polling shows a closer race, and Trump has held on to his base despite all the country’s problems, with job approval ratings fluctuating from the low-to-high 40s. Friday’s job numbers showed falling unemployment and over 2 million new jobs added to the economy. Former Obama economic adviser Jason Furman has warned Democrats that they could see impressive jobs and growth statistics in the weeks before the election as the economy pulls itself out of a largely virus- and lockdown-induced tailspin. Some polling also shows greater enthusiasm among Trump voters.

Biden has said he will pick a running mate by Aug. 1. As an older white man, he is under pressure to choose a woman or minority who is younger than he is. If elected, Biden would be the oldest person ever elected president, entering office at an older age than Ronald Reagan left it or than Trump would be if he served two terms. The convention in Milwaukee has already been delayed by the coronavirus and could take the form of a more virtual event.

The former vice president will present himself as a steady, unifying presence in contrast with the less conventional, often combative Trump. Trump faced no serious competition for the Republican nomination and remains popular with the party’s rank-and-file voters.

“I truly believe that when we stand together, finally, as one America, we will rise stronger than before,” Biden said Friday night. “This is the United States of America. There is nothing we can’t do if we do it together.”

Naomi Lim contributed to this report.