New York Republicans joined forces with a group of dissident Democrats on Tuesday to form what they called a “bipartisan governing coalition” to run the State Senate, preventing the Democratic Party from taking control even after it appeared to have won a majority of Senate seats in elections last month.

The announcement was the latest twist in a state capital that has had more than its share in recent years, with a string of leadership squabbles, corruption investigations and sex scandals that at times crippled the government and made Albany a laughingstock.

The power-sharing deal announced Tuesday was a victory for New York Republicans, who are outnumbered 2-to-1 in the state’s electorate and who fared unexpectedly poorly in a series of Senate races last month. The exact outcome of the election remains unclear, because ballots in two close races are still being counted, but the consensus in Albany is that the Democrats won more seats than the Republicans.