A Pennsylvania court on Friday ordered election officials to set aside provisional ballots cast on Election Day by voters whose absentee or mail-in ballots were received on time. Those provisional ballots were to be separated until officials could determine if they were validly cast, according to an order by the Commonwealth Court in a lawsuit brought by Republican candidates. As ballots were still being counted on Friday three days after polls closed, Democratic challenger Joe Biden took a narrow lead over Republican President Donald Trump in Pennsylvania. If the lead holds, it would give Biden the presidency. The Republicans were challenging guidance issued by Secretary of State Kathy Boockvar that allows defective mail-in ballots to be “cured” by giving people the opportunity to file provisional ballots. Republicans say that guidance violates state law. In a separate Republican challenge seeking to block late-arriving mail-in ballots in Pennsylvania, which is pending at the Supreme Court, the Republicans asked the justices to issue an order requiring that the ballots in question be set aside during the counting process. Boockvar had already said she would voluntarily do that, but the Republicans said in the request it is “unclear” whether all the counties are complying. Late-arriving ballots are a tiny proportion of the overall vote in the state, Boockvar has said. Biden leads Trump 49.5% to 49.3% in Pennsylvania, a difference of more than 13,500 votes, according to Edison Research, with 96% of expected votes cast. Under Pennsylvania law, a recount is automatic if the margin of victory is less than or equal to 0.5 percentage point of the total vote. In Philadelphia, the state’s largest city, about 40,000 ballots remained to be counted, the majority of them provisional and military ballots, and the final count could take several days, election officials said.