They wanted control, and gerrymandered the districts, but they never counted on the extremists in their own party or the damage those extremists would do.

Karma, as Republicans in Congress are finding out, works in interesting ways.

Back around the time of the last U.S. Census, the party worked hard to get control of governorships and legislatures in states. In 2006 the party controlled the governorship in just 17 states. By 2012, the number had ballooned to a record 30.

This was important because after each census state legislatures are responsible for drawing up the legislative districts, not just for state offices but for federal offices as well. And this redistricting almost invariably involves some degree of gerrymandering, the process by which the party in power draws the districts to favor themselves. Both parties do this. Just look next door at what the Democrats did in Maryland when they redrew a congressional district and turned it from Republican to Democrat.

Because so many state legislatures were controlled by Republicans, the party was able to draw a lot of districts where their candidate was virtually assured a victory simply by putting his or her name on the ballot. Between the two parties, they’ve pretty much locked up most of the congressional districts to the point where Democrats don’t mount serious challenges in Republican districts, and Republicans don’t mount serious challenges in Democratic ones.

Case closed, right? Everyone is safe. At least until the next Census and subsequent redrawing of district lines (which is why Democrats are now mounting renewed efforts to take back state legislatures).

Except Republicans didn’t count on the tea partiers. Not facing serious opposition from the opposing major party meant that incumbents only had to defeat challengers from their own party. On the Democratic side, not too many far left candidates got a lot of traction. The same wasn’t true for Republicans though, and quickly we began hearing about congressional incumbents not being conservative enough.

Combined with the angst over the party allowing the Democrats to get Barack Obama elected not just once, but twice, many Republicans bought in to the idea of kicking out the bums and getting some tea partiers elected.

Today there aren’t many of them remaining, and some have even tempered their stands on issues as they have learned that if you are not willing to compromise, you aren’t going to get anything done in Washington.

Others, however, want to shut down the government if their demands are not met. They want to bring governing to a grinding halt. They fit nicely into the Donald Trump narcissistic mold in which they and their ideas are the only ones that matter, and if they can’t have their way they will do all they can to cause pain and misery for the rest of the nation.

We saw the result in the battle over the repeal of Obamacare. And we saw it when they cried about Trump making a deal with Democrats on the debt ceiling. Think about that for a second. Millions of people in need due to hurricane Harvey, more likely in need with Irma, and they wanted to play politics. Never mind that they can still have their debt ceiling battle later, after the victims have been taken care of. No, they wanted to hold people’s lives and livelihoods as bargaining chips to get what they wanted.

So Trump turned to Democrats. Other, reasonable Republicans joined in to pass the measure. They should continue to work with the Democrats moving forward.

Mainstream Republicans will never win with the extremist right. We have seen it time and again. And major issues are impacting our country that need addressing. Reasonable people understand that good ideas can come from both the right and the left. They know that most often, in order to serve a greater good, sometimes you have to give a little to get a little. That’s how the country moves forward.

Republicans thought they were creating an election utopia when they made all those safe districts. Instead, they created a modern version of Dante’s Inferno and are suffering through their own seven layers of hell.

The time has come to slice off the cancer that has infected the party and begin working with Democrats. That is the only way that Republicans are going to achieve any of their agenda goals. Will they get them all? Probably not. But they will get some. And those victories will help move the country forward while, perhaps, improving their own ratings with the voters who might be more inclined to return them to office next year.

When Harvey hit, when Irma hit, we showed once again that we are at our best when we are working together. Republicans and Democrats need to do that again and, if it means the extreme right is left out because they don’t want to be part of the solution, then so be it.

Republicans created their own problem with their political gerrymandering. Now Karma is bringing it to them, and it is up to them to fix things by putting this small minority of members in their place, and then getting on with the business of running the country based on the real Republican values that seem to have fallen by the wayside.

Jim Lee is editor for Gatehouse Media Delaware. Email him at jim.lee@doverpost.com.