Republican state Sen. Randy Vulakovich and Democratic state Rep. Dom Costa may hail from different political parties.

But they share a few things in common: Both were police officers. Both represent parts of Allegheny County. And both are middle-of-the-road lawmakers who cross party lines to make deals.

Now they have something else in common: They’ll be out of jobs come Dec. 1.

Vulakovich and Costa lost primaries last week, victims of shifting political winds within their respective parties.

Those winds, pundits say, may be blowing in different directions — far right and far left — but they threaten to do the same thing: Make compromise harder between and among Republican and Democratic lawmakers in Harrisburg.

State Sen. Randy Vulakovich, R-Allegheny

State Sen. Randy Vulakovich, R-Allegheny, lost re-election on May 15. (Pennsylvania General Assembly)

Rep. Dom Costa, D-Allegheny

Rep. Dom Costa, D-Allegheny, lost re-election on May 15. (Pennsylvania General Assembly)

Vulakovich, an 11-year member of the Legislature, was crushed in the May 15 primary by an opponent who had the backing of the GOP’s tea party wing. It targeted him for breaking its cardinal rules against compromise and tax increase votes.

Costa, a lawmaker since 2009, was laid to waste by the renewed strength of the Democratic Party’s progressive wing, populated with voters fed up with candidates’ moderate-to-conservative stances on social issues. Adherents believe in universal access to health care, abortion rights and immigration, among other issues.

The dynamics of tea party members and Democratic progressives are similar, said Alan Novak, former state GOP chairman who is now a lobbyist and political commentator.

“They tend to be less establishment, tend to push toward a narrower set of issues,” Novak said.

Novak’s business partner and friend, T.J. Rooney, agreed.

Rooney, former chairman of the state Democratic Party, said the tea party and the progressive movements were birthed from a rejection of how government operates.

Although the groups are upset with different specifics — progressives are focused on inequality, while tea party members focus on lowering the country’s debt — both exist on the outer ends of their party’s spectrums, he said.

“What motivates everybody is the dysfunction in government,” Rooney added. “That’s the common thread.”

The tea party movement became popular in 2009, after former President Barack Obama announced a plan to provide financial assistance to homeowners and the banking industry due to the Great Recession. Tea party followers made federal and state deficit reduction part of their platforms.

As the tea party gained strength, several incumbent lawmakers in Washington, D.C., and Harrisburg opted not to run for re-election or were replaced with more hard-line conservatives during the 2010 election. That helped Republicans build big majorities in Congress, as well the state House and Senate.

“The tea party was literally able to dominate Congress in the next several elections until the House was the most conservative it has ever been,” said G. Terry Madonna, a political science professor at Franklin & Marshall College and pollster. “There is not much room for compromise even without [progressives]. Much of what gets passed gets passed along partisan lines.”

Progressivism predates the Great Depression and was focused on improving the plight of the poor and workers. It gathered new steam during the unsuccessful presidential run of U.S. Sen. Bernie Sanders (D-Vt.) in 2016.

Sara Innamorato, also a member of the Democratic Socialists of America, beat Costa in a race for a Pittsburgh House seat.

Summer Lee, also a member of the Democratic Socialists of America, beat Costa’s cousin Paul for his House seat in Allegheny County. Paul Costa had held his seat since 1999.

Neither Innamorato nor Lee face GOP opponents in the Nov. 6 general election, ensuring they will be sworn into office in January, barring unforeseen circumstances.

Two other progressive candidates, also backed by the party’s socialist wing, won Philadelphia-based House seats. Only one faces a general election opponent.

In addition, Jon Fetterman, mayor of Braddock, Allegheny County, and a longtime darling of the progressive movement, beat Lt. Gov. Mike Stack, a moderate, to be Gov. Tom Wolf’s running mate in the fall.

Primary elections historically attract “highly partisan” voters in the two major parties, said Tom Baldino, a political science professor at Wilkes University in Wilkes-Barre.

That’s because Pennsylvania’s closed primary elections exclude those registered to other parties. So it’s rare to see a candidate with a moderate platform win a primary, Baldino added.

But change could be coming.

On Monday, the Senate’s top Republican added his voice to calls to open the state’s primary voting system to independents and other third-party voters.

In a speech before the Pennsylvania Press Club, Senate President Pro Tempore, Joe Scarnati, R-Jefferson, said the closed primary system is resulting in too many “extremists” in both parties, making the act of governing too hard.

Scarnati, elected in 2001 as an independent, said he soon will introduce legislation to end closed primaries, a concept broached earlier this month by House Majority Leader Dave Reed, R-Indiana.

“I’m a conservative, but I don’t think I fit the [new] brand of conservatism,” Scarnati said, adding many Democrats don’t fit the “liberal” brand anymore being espoused by that party’s far-left faction.

In a 2012 CBS News–New York Times poll, self-identified tea party members said they were most angry that the government did not represent the people.

That same idea motivated Innamorato to run against Dom Costa, and voters agreed.

“It was a wake-up call to show them that [Democratic Party leaders] have been disconnected from the everyday residents,” she said.

When she gets to Harrisburg, Innamorato said, “It’s not about compromise, it’s about convictions” to find a balance between party ideologies.

Vulakovich, elected to the House in 2007 and the Senate in 2012, fears that this mentality diminishes governance.

He lost to Jeremy Shaffer, a Ross Township, Allegheny County, commissioner, who had the financial backing of the Citizens Alliance of Pennsylvania, a conservative group that seeks to oust moderate Republicans.

“I think people are tired of us being Tax-sylvania,” Shaffer told the Pittsburgh Post-Gazette after his victory.

The group targeted Vulakovich largely over his 2013 vote to raise the fuel tax to fix roads and bridges. Although he lost largely over that vote, Vulakovich said, he did the right thing to fix two decades of dangerous highway neglect.

“If I had to put up that vote again, I would,” Vulakovich said in an interview. “I’m not an ideologue, I’m a pragmatist. I believe government should be about working together to get things done.”

Gillian McGoldrick is an intern with the Pennsylvania Legislative Correspondents’ Association.