Calcified lawmakers in Harrisburg rarely do anything that could remotely hinder their safe reelection.

So, the surprise decision by Senate President Pro Tempore Joe Scarnati (R., Jefferson)  to introduce legislation to open primary elections to all voters — not just those registered to major parties — underscores how the state's election process is badly broken.

Scarnati admitted "the extremes of the parties have taken over the primary process." He pointed to a conservative insurgent's recent victory over incumbent Republican state Sen. Randy Vulakoich, who supported a bipartisan bill that increased the gasoline tax. Two Democratic state representatives lost primary elections to candidates endorsed by a socialist organization.

That was a wakeup call for Harrisburg lawmakers that the rigged game they created of closed primaries and gerrymandered districts no longer guarantees easy reelections.

Hence the move to open primaries, which House Majority Leader Dave Reed (R., Indiana) said he also supported.

A move to an open primary system – combined with the state Supreme Court ruling in January that upended the gerrymandered districts – would be a welcome sea change for Pennsylvania. Lawmakers currently struggle year after year to perform even the most basic task of passing a balanced budget on time. Instead of compromise, nearly every piece of legislation is a zero-sum game that often leads to gridlock.

A leading cause of the dysfunction can be traced back to closed primaries – and its ugly cousin, gerrymandering.

Pennsylvania is one of only 11 states with closed primaries. In a closed primary, for example, only registered Republicans can vote for Republican candidates and vice versa for Democrats. Voters registered as independents or nonaffiliated are barred from voting in the primary for Democrats or Republicans. More than 1 million voters in Pennsylvania are registered as independents, nonaffiliated, or to minor parties, leaving about one in seven voters out of the primary process.

The upshot: Closed primaries tend to produce more extreme partisan candidates. Often those candidates are running in gerrymandered districts that give one political party an advantage over the other. Districts that lean heavily toward Republicans or Democrats effectively make the general election for that district a non-contest.

In January, the Pennsylvania Supreme Court ruled the state's gerrymandered congressional map "clearly, plainly, and palpably" violates the state constitution and ordered the map redrawn. That was a major breakthrough in making the election playing field even, but an independent commission is needed to remove the politics from drawing the districts.

Creating fair and politically balanced districts – combined with open primaries – would make for more competitive elections and dramatically improve the quality of Pennsylvania's governance. Voters would also become more interested and engaged in a system they currently view as being rigged.

California moved to open primaries in 2012. The results have been transformative. Lawmakers from opposite parties now work together on major issues. Budgets get passed on time. A number of incumbents have been replaced, and California now has some of the most competitive races in the country.

Open primaries and fair districts are just the recipe Pennsylvania needs to fix its broken election system. Such changes can't come soon enough.