The recount couldn’t save David McCormick.

As recently as Thursday afternoon, the former hedge fund CEO’s campaign had been bullish on his chances, saying he could still win — once all votes were counted and legal questions resolved.

Within a day, reality had set in.

“It’s now clear to me, with the recount largely complete, that we have a nominee,” McCormick told supporters in Pittsburgh Friday night, with his wife, Dina Powell McCormick, by his side. He conceded the race, ending his campaign and offering Mehmet Oz his support.

As county after county ran through the Pennsylvania Republican Senate primary votes a second time, the numbers barely budged. With one or two votes changing here or there in small pockets across the state, it became clear the recount would ultimately only affirm the original result: Oz narrowly defeated McCormick.

Some within the campaign were acknowledging Thursday that McCormick would need to prevail in several legal challenges to even have a chance. And while the Pennsylvania Commonwealth Court delivered the McCormick campaign a key legal victory late Thursday night — ordering the counting of undated mail ballots that previously would have been rejected — it wasn’t going to provide anywhere near enough votes.

By Friday, it was clear: McCormick was out of runway.

It may be an uncomfortably close defeat — still on track to lose to Oz by fewer than 1,000 votes, or one-tenth of 1 percent of the vote — but it was a defeat, nonetheless.

» READ MORE: McCormick and Oz are fighting over tiny batches of votes in county after county. That’s how tight the Pa. GOP Senate primary is.

Only tiny shifts for McCormick in the recount

On Thursday, the campaign was still holding out hope.

“It doesn’t take much of a path,” a senior McCormick campaign official said, speaking on condition of anonymity to discuss internal assessments and strategy.

But the path kept narrowing. Many of his team’s initial hopes had already fallen by the wayside.

A prediction that mail ballots would put McCormick over the top proved unfounded, because there were far fewer than the campaign estimated. A hope that military ballots would make a big difference didn’t pan out. Their fight to count undated mail ballots ended up focused on too few votes.

Some of the campaign’s optimism, even late into this week, may have come from misreading the data. For example, many people, relying on incomplete data, far overestimated how many mail ballots were left to be counted after primary day. Nor was it ever likely there would be a large enough number of military ballots. And it turned out there were only about 800 undated Republican mail ballots.

On Thursday, the campaign official said the recount was producing large changes in results — but that assertion was based on incomplete numbers from eight days prior. So while the campaign calculated it had picked up dozens of votes in Philadelphia, it had actually lost two, and Oz had gained one.

Most counties had actually found that their initial vote counts were almost spot-on, with tallies only shifting by two or three votes per county, out of thousands cast.

» READ MORE: There’s another high-profile vote count in Pennsylvania, but Republicans aren’t objecting this time

Delaware County, one of the 10 largest for Republican votes, added two Oz votes and five for McCormick, a net gain of three for McCormick. Cumberland County, also in the top 10, added one vote for Oz and two for McCormick. In Somerset County, a rare example so far of a double-digit change, McCormick picked up 14 votes in the recount — but Oz picked up 11. That’s nowhere near what McCormick needed to win.

“McCormick was supposed to pick up supposedly hundreds of votes in some of these precincts,” said U.S. Rep. Guy Reschenthaler (R., Pa.), an Oz supporter.

Slight changes during recounts are normal — and part of the reason for automatic recounts such as this one, triggered by state law when the margin of victory is within 0.5% of the vote. During a recount, a small number of votes that were previously read by a machine are instead reviewed manually. All recount numbers are unofficial and subject to change by the state’s certification deadline of noon on Wednesday.

The Oz campaign, meanwhile, mostly appeared content to play defense, confident the original numbers would hold up.

Pinning his hopes on the courts

Shortly after election day, the McCormick campaign began fighting before judges and county elections boards over every available pocket of votes.

McCormick’s army of lawyers contested ballots and argued over election law in court, a clear sign of how tight the margins were — and that victory wasn’t assured in the recount alone.

Yet the number of votes at issue in those legal challenges were never enough to close the gap, even if they prevailed.

In Berks County, the campaign had challenged dozens of provisional votes cast during a court-ordered, hourlong extension of election day voting due to malfunctioning electronic poll books in some precincts.

» READ MORE: Mehmet Oz called himself the ‘presumptive’ Pa. Republican Senate nominee even though a recount is on

And while the Commonwealth Court ruled in McCormick’s favor to include undated mail ballots — those which arrived on time but were missing the required handwritten date on their outer envelope — the roughly 800 undated Republican mail ballots at issue were unlikely to deliver McCormick more than a few dozen net votes, given the overall patterns.

McCormick had outpaced Oz in votes cast by mail. But a significant portion of mail ballots — about 45% of those counted — went to candidates besides him. For example, undated ballots in Delaware County would give three more votes to McCormick — but also two to Oz. Philadelphia’s undated ballots gave McCormick 22 more votes, but 24 for Oz.

McCormick’s most recent legal challenge — a suit seeking a hand recount of ballots in 150 precincts across 12 counties — was also unlikely to deliver seismic shifts.

The campaign targeted precincts where it said voting patterns were out of line with what it believed are historical norms. It singled out counties where the number of GOP votes cast in the gubernatorial primary and the Senate race vary significantly from each other.

But such “undervotes” are common — it’s not unusual for someone to vote in one race and skip another.

Elections officials in several of the targeted counties said they were confused by the precincts the campaign chose. There was nothing unusual going on, they said, and the recount so far has affirmed that. One county official talked with poll workers in the relevant precincts and examined the results after the lawsuit was filed, and came up empty.

“This hand recount thing, they’re going off of what? Data?” the county official said. “There’s nothing wrong, they’re all spot-on.”

On Friday, the 12 targeted counties joined together to oppose the request, saying McCormick’s idea of having people manually review votes in case of error is exactly what counties do during the automatic recount. While the ballots are run through machines, those scanners flag any ballots with issues — meaning those are hand recounted anyway.

In other words, a court-ordered hand recount would be an expensive, time-consuming way to end up with the same vote totals.

Even with a hearing on the issue looming Monday, McCormick’s campaign on Friday invited supporters to a “recount party” in Pittsburgh. With short notice, they alerted the media, too, and McCormick stepped to a lectern in the same hotel ballroom where he had hoped to celebrate a victory on election night.

The 17 days since then, he joked, had felt like 17 years. And then he conceded what had become obvious.

“We came so close,” McCormick said.

But there were no moves left, no cards left to play.

He came up short.

Oz won.