Mehmet Oz emerged as the Republican nominee for U.S. Senate in Pennsylvania Friday after GOP rival David McCormick conceded, ending weeks of intrigue in the closely contested race as a recount showed no signs of changing the outcome.

The decision, more than two weeks after the May 17 primary left the two candidates separated by fewer than 1,000 votes, allows the celebrity surgeon widely known as Dr. Oz to move forward as the undisputed GOP nominee. He can now fully launch his general election campaign while the Democratic candidate, Lt. Gov. John Fetterman, remains sidelined by a stroke, with no clear timetable for returning to the campaign trail.

McCormick’s move ended an extraordinarily expensive and at-times bitter primary fight between two ultra-wealthy opponents, one that rumbled on in legal wrangling through this week.

But days into a statewide recount, it had become clear McCormick, an Army veteran and former hedge fund CEO, wasn’t gaining enough votes to make up the gap. Even large counties, reviewing thousands of votes, were seeing only small shifts of one or two votes per candidate.

McCormick, speaking at a hotel in Pittsburgh on Friday night, said he called Oz to congratulate him and would support his onetime rival in the general election.

”It’s now clear to me, with the recount largely complete, that we have a nominee, and today I called Mehmet Oz to congratulate him on his victory,” McCormick said in a brief speech with his wife, Dina Powell McCormick, by his side. “I told him what I always said to you, that I will do my part to try to unite Republicans and Pennsylvanians behind his candidacy, behind his nomination for the Senate.”

Oz now moves forward as the Republican nominee in one of the country’s most critical Senate races, after winning former President Donald Trump’s endorsement in a highly competitive primary.

Pennsylvania’s Senate race is one of a handful likely to determine control of the chamber and, with it, the fate of much of President Joe Biden’s agenda after this year.

» READ MORE: David McCormick isn’t winning the recount against Mehmet Oz — and he’s running out of options

“This evening I received a gracious phone call from David McCormick and am tremendously grateful for his pledge of support in the fall election. We share the goal of a brighter future for Pennsylvania and America,” Oz said in a statement shortly after McCormick’s announcement. “Now that our primary is over, we will make sure that this U.S. Senate seat does not fall into the hands of the radical left, led by John Fetterman.”

How Oz won the nomination

Oz, 61, rode his fame, personal wealth, and Trump endorsement to victory in his first bid for public office.

Spending more than $12 million from his own fortune, he overcame a barrage of attack ads from McCormick and a late surge by conservative commentator Kathy Barnette. If elected, he would be the first Muslim to serve in the Senate.

Oz’s win is also a victory of sorts for Trump, and the former president’s push to show he still holds sway in the GOP. In a race so close, his endorsement can’t be discounted, but the narrow margin also shows Trump’s word is hardly decisive with primary voters.

Oz, a cardiothoracic surgeon who parlayed an accomplished medical career into TV fame (with an assist from Oprah Winfrey), now has a chance to join the upper echelons of U.S. government. Like Trump, he campaigned as a “conservative outsider” from the entertainment world who would bring a different approach to Washington.

His campaign in many ways mirrored the TV show that made him famous, with a similar logo, crowds gathered around a stage, and the doctor pulling people out of the audience so he could dramatically check their blood pressure.

But Oz, after living in New Jersey for decades, faced questions about his ties to Pennsylvania. He was raised in Delaware and while he went to medical and business school at the University of Pennsylvania, he has spent more than three decades living in New Jersey and working in New York. He also ran afoul of some Republican voters because of past statements that broke with conservative views on issues such as guns, abortion, and fracking. He disavowed many of those comments, and staked out sharply conservative views during the primary. Oz has said he moved to his in-laws’ home in Montgomery County late in 2020, and earlier this year he purchased a property there.

Polls showed that even among Republicans, many voters viewed Oz negatively after the pounding from McCormick and his allies. Trump vouched for Oz’s conservative credentials, a shield the surgeon wielded repeatedly against attacks from GOP rivals.

While Republicans are painting Fetterman as too liberal for Pennsylvania, Democrats are highlighting questionable medical advice Oz delivered on TV, and, more recently, his statements reinforcing Trump’s false claims about the outcome of the 2020 presidential race in Pennsylvania.

» READ MORE: Fetterman says he ‘almost died,’ but cardiologist says his prognosis, despite ignoring medical advice, is now good

“New Jersey native Mehmet Oz is a scam artist and a fraud who is only ever looking out for himself,” said Jack Doyle, a spokesperson for the Pennsylvania Democratic Party. “He’s a self-serving millionaire who has made a fortune peddling quack treatments and baseless claims that endanger peoples’ health, and his politics are just as damaging: supporting banning abortion and pushing Donald Trump’s conspiracies about the 2020 election.”

Oz and Fetterman will now vie to replace Republican Sen. Pat Toomey, who isn’t seeking reelection.

“I ACTUALLY LIVE IN PENNSYLVANIA!!!” Fetterman tweeted shortly after McCormick’s announcement, linking to a photo of Oz kissing his own star on the Hollywood Walk of Fame. He asked for donations “to help me beat New Jersey’s Dr. Oz in November.”

A primary season full of twists

McCormick’s concession Tuesday capped a roller-coaster primary.

It included a celebrity TV star, tens of millions of dollars of advertising, the downfall of Trump’s first pick, Barnette’s sudden rise, and Fetterman’s stroke days before the primary.

The too-close-to-call finish for the GOP, recount, and legal wrestling that followed only added more twists.

McCormick, who had long-standing ties to elite financial and political circles and had served in the George W. Bush administration, had never run for elected office either. He spent millions of his own money, along with much more from his wealthy supporters, in a run that brought him within a hair of the Senate nomination.

But he faced questions about his attempts to present himself as an “America First” conservative. He grew up in Pennsylvania, in Bloomsburg, but lived in Connecticut for more than a decade before buying a home in Pittsburgh late last year, just as he prepared his Senate campaign.

Oz was Trump’s second pick in the contest. In August the former president had endorsed Sean Parnell, a conservative author and decorated veteran, briefly making him the front-runner. But Parnell’s campaign collapsed less than four months later, in late November, after his estranged wife, under oath, accused him of verbal and physical abuse during a custody trial. Parnell, also under oath, denied the claims, but a judge sided with his wife.

Parnell’s departure opened the door for new entries. Oz joined the contest eight days after Parnell quit.