Democratic presidential candidate former Vice President Joe Biden speaks to supporters, early Wednesday, Nov. 4, 2020, in Wilmington, Del. (AP Photo/Paul Sancya)

The Associated Press and NPR have called the presidential race for Joe Biden, a historic win for the Pennsylvania-born Democrat whose decades-long career in public service has been rooted in Delaware. His victory in Pennsylvania pushed Biden over the top.

The call comes five days after Election Day as millions of mail ballots were tallied by county officials, which slowly eroded the advantage President Donald Trump held based on in-person voting. Biden’s victory in the key swing state, with its 20 electoral college votes, makes it virtually impossible for President Donald Trump to win reelection, barring a major reversal from the courts.

The outcome follows a series of vital wins in Wisconsin and Michigan — a trio of once-solid Democratic states known as the “blue wall,” all of which flipped for Trump over Hillary Clinton in 2016. Biden also currently leads in Georgia, Nevada and Arizona, which the AP has called for Biden.

If those margins hold, Biden would win the presidency with 306 electoral college votes, the same number Trump tallied in 2016. The victory also makes U.S. Senator Kamala Harris the first woman, first Black person, and first South Asian American person to become vice president in American history.

Over the last several days, Trump’s campaign has filed a flood of legal challenges contesting Pennsylvania’s election. So far, court decisions on these have not affected the count and Biden’s lead makes those challenges unlikely to affect enough ballots to reverse the outcome.

The race, while relatively close, appeared closer and more tumultuous than it actually was due to the way Pennsylvania counted its ballots.

At midnight on Election Day, Trump’s lead was about half a million votes, with the majority of them cast in person at the polls. That difference has shrunk by the hour since Tuesday, as county election officials tabulated more than 2.6 million mail ballots. A proposal allowing early processing of mail ballots could have meant a faster result, but Republicans in Harrisburg refused to agree to the measure as a standalone reform.

This so-called “blue shift” in vote margin was widely expected. But who are the Keystone State voters that took Biden over the top?

A spread of trends are emerging in the election returns, Democratic officials say. There was a Democratic groundswell in the Philadelphia suburbs; sizable gains in bellwether counties like Northampton and Erie; overwhelming support from predominantly Black communities; and a stronger performance than Hillary Clinton in the northeastern part of the state.