Spotlight PA is an independent, non-partisan newsroom powered by The Philadelphia Inquirer in partnership with PennLive/The Patriot-News, TribLIVE/Pittsburgh Tribune-Review, and WITF Public Media. Sign up for our free newsletters.

HARRISBURG — With Gov. Tom Wolf’s agenda for his final two years in office hanging in the balance, Republicans in Pennsylvania appeared on track to expand their majority in the state Senate and keep control of the House.

The GOP, which has controlled the Senate since 1994, scored victories for incumbents in Erie and Lancaster Counties, while also picking up a flip in the southwest part of the state, according to the Associated Press.

All three seats were seen as prime targets for Democrats, who, led by Wolf, spent big in their effort to end the GOP’s reign.

“We are confident with the results that are already in that not only have we maintained the majority, but it is likely that we will increase our majority,” state Sen. Majority Leader Jake Corman (R., Centre) told reporters Wednesday.

By Wednesday afternoon, the House Democratic Campaign Committee had conceded one of its targets in Dauphin County, but declared victory in a Montgomery County seat. And the chair of the committee urged patience as candidates wait for county election offices to count a flood of mail ballots.

“Anyone who tries to call a race prematurely is doing so to amplify Donald Trump’s message of election chaos,” Rep. Leanne Krueger (D., Delaware) said.

House Republican leaders said they saw promising signs from the early election results, particularly in Democrat-held districts that Trump won four years ago, but they also acknowledged that they were waiting for more totals. Republicans took control of the House in 2010.

As of Thursday morning, the Associated Press had called 172 of the 203 House races, including 102 for Republicans. That would be enough to secure the majority.

“We’re as anxious to see the results as anybody else, but we feel very confident,” state Rep. Greg Rothman (R., Cumberland), chair of the political arm for House Republicans, said Wednesday.

Control of the legislature is particularly important heading into 2021, when lawmakers will draw new congressional maps and potentially shape Pennsylvania politics for the next decade. For Wolf, it was key to his agenda for raising the minimum wage, enacting a severance tax on natural gas drilling, and other issues.

Wolf’s campaign committee spent about $2.8 million on state House and Senate races this year, another sign of how important control was to the governor.

In the Senate, incumbent Republicans Dan Laughlin in Erie County and Scott Martin in Lancaster County easily held onto their seats, according to the Associated Press. The news outlet also declared Democratic Sen. Pam Iovino, who won a hotly contested special election in 2019, had lost to Republican challenger Devlin Robinson.

Iovino, meanwhile, had not conceded as of Thursday morning, saying on Twitter, “The results show us trailing, however, there remain an unknown number of votes that will need to be counted by hand.”

Competitive challenges to Republican state Sen. Tom Killion in Delaware and Chester Counties and state Sen. John DiSanto in Dauphin and Perry Counties had not been called as of 5 p.m. Wednesday. Candidates were also awaiting results for a few Democrat-held seats.

In the House, Democrats need a net gain of nine seats to control the 203-member chamber. They targeted races in the Philadelphia suburbs, where they flipped more than a dozen seats two years ago, as well in suburban areas outside Pittsburgh, Harrisburg, and Allentown, where they hoped to capitalize on anti-Trump sentiment.

Democrats failed to pick up one of the seats they had hoped to flip in Dauphin County — the 106th House district held by Rep. Tom Mehaffie — and lost incumbent Rep. Wendy Ullman in Bucks County’s 143rd House district, the Associated Press reported.

Democrats did declare victory in one of their target districts: the 152nd House seat, covering parts of Montgomery County and Philadelphia where Republican state Rep. Tom Murt was not seeking re-election. The Associated Press had not declared a winner in that seat as of Wednesday afternoon.

Democrats also had to defend some of their most conservative members in places where white, working-class voters have shifted to Trump and Republicans in recent years. Their incumbents in Cambria, Westmoreland, and Lawrence Counties faced well-funded opposition. The conservative political action committee Commonwealth Leaders Fund ran ads linking them to Wolf and criticizing a vote they took this spring against loosening coronavirus restrictions on businesses.

Commonwealth Leaders Fund was one of many groups and outside donors that poured millions of dollars into the races.

Four political committees — Wolf’s, the pro-Democrat Pennsylvania Fund for Change, the pro-Republican Build PA PAC, and Commonwealth Leaders Fund — alone spent more than $17.8 million this year, much of that money targeted at state legislative races, according to the latest available campaign finance reports.

Meanwhile, the political arm for House Democrats reported spending $12.1 million from late June to Oct. 19, while the campaign committee for House Republicans reported spending $6.2 million for the same period.

Everytown for Gun Safety, co-founded by former New York Mayor Michael Bloomberg, recently said it spent more than $1.6 million through two funds to flip the Pennsylvania legislature. The group wants lawmakers here to increase background check requirements for gun purchases and allow judges to temporarily confiscate firearms from a person deemed a risk to himself or others.

A spokesperson for the group declined to discuss the election results Wednesday, saying it was still too early and there are too many ballots to be counted.

This story was updated at 10:15 a.m. to reflect races called by the Associated Press.

100% ESSENTIAL: Spotlight PA relies on funding from foundations and readers like you who are committed to accountability journalism that gets results. Give now and your contribution will be TRIPLED: spotlightpa.org/donate