The Associated Press has declared Republican Dave McCormick the next U.S. senator from Pennsylvania, defeating three-term incumbent Democrat Sen. Bob Casey.

But Casey is refusing to concede.

“This race is within half a point and cannot be called while the votes of thousands of Pennsylvanians are still being counted,” the campaign said in a statement.

The announcement came just hours after the McCormick campaign declared the race over.

“While votes continue to be counted, any way you slice it, Dave McCormick will be the next United States senator from Pennsylvania,” said McCormick communications director Elizabeth Gregory.

Earlier, U.S. Sen. Marco Rubio (R-Fla.) urged Casey to call it a day.

“The race in Pennsylvania is over. I hope Sen. Casey will accept this and concede to Dave McCormick so he can begin the important work of preparing to represent the commonwealth in the U.S. Senate,” Rubio posted on X.

Calling the race was delayed due to a ballot printing issue in Cambria County. Elections officials were hand-counting the ballots, and McCormick was expected to win the county.

McCormick leads Casey by almost half of a percentage point in unofficial returns.

McCormick’s victory is particularly impressive after his loss in the 2022 GOP U.S. Senate primary, and months of trailing in the polls by double digits just before Labor Day. The race tightened to within the margin of error by late September and remained there through Election Day.

Money flowed into the race as the polls tightened. AdImpact Politics called it the second-most expensive race this campaign cycle with total ad spending topping $340 million. And while spending was mostly equal on both sides, Republicans pumped millions into the race in October. They outspent Democrats by more than $9.1 million in the final month.

That doesn’t count the $264 million in total spending in the last 60 days of the presidential race in the Keystone State.

Most political analysts – including Republicans – believed McCormick would give Casey a run for his money but still come up short.

Larry Sabato’s Crystal Ball suggested the race was “Lean Democrat” going into the final week. Cook Political Report gave the race a ‘Toss Up’ rating. Split Ticket said Casey had a 66 percent chance of winning while DecisionDeskHQ gave Casey a 64 percent chance of victory. That was due to Casey’s previous electoral success. (He had lost one election before Tuesday.)

DecisionDeskHQ has yet to call the race, saying it wants to see the Cambria County results along with provision ballot totals.

NRSC Chair Steve Daines released the following statement regarding the results: “Congratulations to Dave McCormick on his incredible victory. Dave built a best-in-class campaign operation, ended a political dynasty, and will now use his considerable skills to bring bold new leadership to the United States Senate on behalf of all Pennsylvanians. I look forward to working with Dave to secure the border and bring down prices for the American people.”

The McCormick victory gives Republicans a three-seat majority in the U.S. Senate. That could reduce the influence of GOP moderates Lisa Murkowski of Alaska and Susan Collins of Maine.

Election modelers defended their decision not to call the race for McCormick earlier in the day.

“We don’t know how many provisionals there are (or how they break), and you can construct a Casey win if you give him the most favorable estimates realistically possible,” Lakshya Jain with Split Ticket posted on X.

Jain doesn’t expect Casey to win, despite the hypothesis. He said McCormick is a “90 percent favorite to win” but did not believe it was callable.

McCormick’s campaign disagreed.

“Race over. Call it,” wrote campaign manager Matt Gruda.