This article is more than
2 year oldMehmet Oz, a surgeon best known for his appearances on the Oprah Winfrey Show, is facing a cliffhanger vote count after the party primary.
He was neck and neck with former hedge fund executive David McCormick.
The race is being closely watched as a test of former President Donald Trump's hold over the Republican party.
The contest in this key presidential swing state is one of a number taking place across the country to determine who will stand for office in the midterm elections in November.
The midterms fall halfway through a president's term in office. They decide who controls the two chambers which make up Congress - the Senate and the House of Representatives.
At present, the Democrat party controls both chambers, but by very slim majorities. And historically, the party that holds the White House has tended to suffer losses in the midterms.
The primaries decide which party's candidates will run against each other in the midterms, and their election will play an important part in determining the rest of US President Joe Biden's presidency.
Five states held primary elections on Tuesday, making it the busiest date on the 2022 midterms calendar so far. Here are some of the projected results:
Earlier this month, Mr Trump's pick for the Ohio Senate primary cruised to victory against his opponents. But Pennsylvania's primary has gone down to the wire.
Despite Mr Trump's endorsement of Mehmet Oz, the race stayed in a three-way dead heat until polls closed.
The Republican contest was shaken up by a late surge from right-wing commentator Kathy Barnette.
But Mr McCormick came from behind, with the race narrow enough to be in recount territory.
By Nomia Iqbal, BBC News
Dr Oz arrived at the venue and did a thumbs up to us and said he was feeling good. Taking to the stage he thanked everyone who supported him and made it clear he wasn't conceding.
He said victory would be his in the end. But his closest rival Dave McCormick - who wasn't backed by Mr Trump - said the same thing.
The results are still being counted but at the moment it's within the margins for a recount. The full count of the actual ballots could take days.
It feels a lot like 2020 when we were here for the presidential race. In the end Pennsylvania projected for Biden taking him over the threshold.
Tonight was a critical test of the former President Trump's ability to back winners… He wants to use the Primaries to prove his dominance over the Republican Party.
Mr Trump really got behind Dr Oz - whether his base did is yet to be decided.
The eventual Republican winner will take on Lt Gov John Fetterman, who easily won the Democratic Senate nomination on Tuesday night - two days after announcing he had suffered a stroke.
On Monday, the left-wing Democrat's team said he had undergone surgery to implant a pacemaker with a defibrillator.
Mr Fetterman, a Harvard-educated former mayor who sported hoodie sweatshirts instead of suits on the campaign trail, remained in hospital on the night of his election victory, with his wife speaking at a campaign event in his place.
In a White House statement on Tuesday night, Mr Biden congratulated Mr Fetterman and argued that the Republican candidates were "too extreme".
But a controversy that dogged Mr Fetterman in his primary campaign is certain to be raised by Republicans during the general election.
In 2013, during Mr Fetterman's second term as mayor of Braddock, a town of around 2,000 outside Pittsburgh, he pursued an innocent black jogger who he wrongly thought had been firing a gun near his home.
Mr Fetterman, who is a hulking 6ft 8in and was armed with a shotgun during the confrontation, has refused to apologise for the incident.
Newer articles
<p>The deployment of Kim Jong-un’s troops has added fuel to the growing fire in recent weeks. Now there are claims Vladimir Putin has put them to use.</p>