PITTSBURGH — Last week, the Pennsylvania Supreme Court stepped over the line by redrawing the entire state’s electoral map.

Filled mostly with elected Democrats, the court made sure their new map favored one party only — the Dems — and gave them exactly what they wanted: a finger on the scale.

“The decision will likely lead to the Democrats picking up three to four seats in the state’s congressional delegation,” explained Jeff Brauer, a political science professor at Keystone College. “So, yes, the court just gerrymandered the districts for the Democrats.”

Not only that, but the new map — which goes into effect in May — has thrown the entire state into confusion. Democrat Conor Lamb and Republican Rick Saccone, due to face off in a special House election in the 18th Congressional District in March, have just discovered that this district will cease to exist by the end of the year.

Both candidates will still face off on March 13 and then be forced to run again for seats in newly drawn districts come November.

The court’s sudden gerrymandering comes at a suspicious time. The current map has been in place for seven years, so why all of a sudden change it? The answer, of course, is politics.

Since the midterm elections of 2010, Republicans have held the majority in the Pennsylvania House delegation. After five years of dominance, the GOP got complacent. The national party paid little money or attention to the urgency of filling the upcoming races for three empty judge seats on the state supreme court, despite the political implications.

Democrats, meanwhile, saw an opportunity to reverse the red tide through the courts, pumping money and support into their candidates. In 2015, they went on to win the majority on the court with five Dems to two Republicans.

Late last year, Democrats on the court began hearing arguments that would upend the state’s electoral map. Though both Republican-backed judges and one Dem-backed judge dissented, last week’s ruling stood — an egregious result that defies our traditional political process.

“The majority party of the legislatures [has] the right to draw the lines — not some judges years later . . . for the advantage of their party,” Brauer said. “Both parties know that and act accordingly. That has been part of American political culture for centuries.”

While Brauer is upset that a supposedly fair and neutral court engineered a ruling to favor their partisan team, he is also concerned about how much disruption the ruling has caused. “All of a sudden current members of Congress have to figure out where they run or if they run, with challengers facing the same issue,” he said. “This could have been held off for a couple of years when the Democrats stood a fairly good chance of drawing a more favorable map without having the courts involved.”

There is a chance the map change could be challenged. Last week, President Trump tweeted his wish to see that happen, stating: “Hope Republicans in the Great State of Pennsylvania challenge the new ‘pushed’ Congressional Map, all the way to the Supreme Court, if necessary. Your Original was correct! Don’t let the Dems take elections away from you so that they can raise taxes & waste money!”

But first the Supreme Court has to agree to hear the case. In the meantime, we should ask ourselves whether the courts have any business fundamentally changing a system that has been in place since our country’s founding.

As Charlie Gerow, a Harrisburg-based attorney and media strategist said, “This is the court venturing far afield into the political netherworld . . . a raw exercise of judicial power.”

And Brauer added: “If Pennsylvania wants to finally address the issue of gerrymandering, then there is a much better manner, time and place to do that than through the courts toward the end of a 10-year district cycle.”

But is there really a better way? The answer isn’t simple given the reluctance on either side to give an inch. Certainly though, sowing discord and replacing partisanship with yet more partisanship isn’t the answer.