The “blue shift” was real.

In the hours after polls closed Tuesday, President Donald Trump held what appeared to be a strong “lead” in the partial results. At 2 a.m. Wednesday, he had more than 701,000 more of the counted votes than Joe Biden did. Trump had won 57% of the two-party vote counted at the time, with Biden taking the other 43%. That’s a gap of 14 percentage points.

But it was always an illusion.

A significant portion of the vote had not yet been counted, and as those votes were tallied in the days following, the gap eroded, and then disappeared. By early Friday morning, Trump was up by just 18,000 votes. When new Philadelphia numbers came in shortly before 9 a.m., they were enough to narrowly put Biden in the top spot. That made it a greater than 14-point shift from early Wednesday to Friday morning. And that could grow, with data from the Pennsylvania Department of State suggesting there are more than 100,000 mail ballots still to be counted — along with an unknown number of provisional ballots — that are also likely to favor Biden.

That steady blue shift was the direct and predictable result of a straightforward set of facts:

1. Pennsylvania had way more mail ballots than ever before.

2. Counting those mail ballots takes a long time.

3. Democrats were much more likely to vote by mail than Republicans were.

Taken together, those facts meant the results released Tuesday skewed heavily in Trump’s favor because they were made up primarily of in-person results. As the mail ballots were counted, heavily favoring Biden, they shifted the numbers.

Trump won about 65% of the in-person votes counted, compared with 33% for Biden. But Biden has won 76% of the mail ballots counted so far, with Trump receiving the other 23%.