Democrats in Pennsylvania have won control of the state House of Representatives after besting Republicans in three special elections on Tuesday, reaching a majority in the chamber for the first time in 12 years.

The Associated Press called the three races, all in the Pittsburgh area, ending a monthslong stalemate over which party would control the House. Democrats now hold 102 of the 203 seats that make up the chamber, giving them a slim one-seat majority. 

Republicans went into the November general election with a 113-89 seat majority, but lost 12 of them to Democrats. 

RUMORED SENATE CANDIDATE ELISSA SLOTKIN ANNOUNCES DIVORCE FROM HUSBAND AFTER MOVING TO HOME OF LOBBYIST, DONOR

Pennsylvania state house in Harrisburg

The Pennsylvania state Capitol in Harrisburg is seen on Dec. 14, 2020. (AP Photo/Matt Slocum, File)

One Democratic member passed away from cancer ahead of the election in October, and two subsequently resigned after winning higher office, leaving three vacant seats and a slim 101-99 margin for Republicans.

Prior to Tuesday's special elections to fill those three vacant seats, Republicans sought to strike a deal to avoid losing their majority by supporting state Rep. Mark Rozzi, a Democrat-turned-independent, to be House Speaker. 

VIRGINIA GOP STAR VOWS TO END DEMOCRAT ‘ROADBLOCK’ OF GOV. GLENN YOUNGKIN'S AGENDA

Part of the deal was for Rozzi to drop his Democratic Party registration and become a registered independent, which would have left the chamber in a tie. He didn't, however, drop his Democratic registration and ultimately recessed the House indefinitely after a consensus couldn't be reached on a piece of legislation.

Pennsylvania House Speaker Mark Rozzi

Pennsylvania House Speaker Mark Rozzi says he has no intentions to step aside for conventional Democratic leadership in his chamber. (AP Photo/Matt Rourke)

CLICK HERE TO GET THE FOX NEWS APP

With a clear majority, Democrats are expected to put up another candidate for speaker and oust Rozzi, but it is unclear which candidate might have the votes to win the job.

The Associated Press contributed to this report.