People, me included, were shocked that Republican Sheriff BJ Barnes lost his reelection bid last week to Democrat Danny Rogers.

It was also surprising that District 27 Republican state Sen. Trudy Wade lost to Democrat Michael Garrett. Democratic 13th District congressional candidate Kathy Manning lost her own race to Congressman Ted Budd, but she played in major role in the loss of both Barnes and Wade.

Manning, despite spending more than $3.5 million on her campaign, didn’t win, but she did a great job of getting the vote out and she won big in Guilford County. Manning won 62 percent to 36 percent for Budd in Guilford County. Do you think that people who went to the polls primarily to vote for Manning voted for Barnes or Wade? It doesn’t seem likely.

Manning lost big once she got out of Guilford County, and Budd won the race with 52 percent to 46 percent for Manning, which is not nearly as close as many were predicting. Polls consistently listed the 13th District as “leans Republican,” but with a six-point margin it would have been more accurate to place it in the Republican column.

So while Manning couldn’t get herself elected, she did get some Democrats elected and made a couple of other races much closer than they should have been. You can’t put $3.5 million into a race without having some effect. In Manning’s case all that hype caused the Democratic turnout in Guilford County to be higher than it would have been and brought large numbers of people to the polls who came for one reason – to vote for Democrats.

A good indication of what was happening was in the District 2 Guilford County Board of Commissioners race where incumbent Republican Alan Perdue with 53 percent defeated Democrat Scott Jones with 47 percent.

Perdue is the retired director of Guilford County Emergency Services. He seems to know just about everyone in the county, has served well as a commissioner and, while he is a Republican, he is not overtly partisan.

Jones is a perennial candidate who has run as both a Republican and a Democrat and once ran for governor. He doesn’t campaign much, but puts his name on the ballot and hopes for the best.

In a normal year he likely would have received at most 40 percent of the vote. Instead he was in the race and only lost by six points. The people voting for Jones had to be voting for every Democrat on the ticket because by any measure other than political affiliation Perdue is the better candidate.

The sheriff’s race was similar except for outcome because the sheriff’s race is countywide while Perdue was running in a Republican leaning district. In the sheriff’s race Barnes – who has been sheriff for 24 years, is highly respected and usually gets votes from both parties – was soundly defeated by Rogers who hasn’t worked in law enforcement since 1993 and was fired from both the Guilford County Sheriff’s Department and the High Point Police Department.

Rogers did campaign but was expected to lose like he did in 2014. However, not only did Rogers win, he won by a very comfortable margin with 53 percent of the vote to 47 percent for Barnes. Even a recount in Broward County, Florida, couldn’t change the winner in that race.

Of course, there were many other factors at play in the election.

Despite the fact that the North Carolina Constitution says that the state legislature will draw legislative districts, three Democratic federal court judges decided to hire a special master to draw the state legislative districts for Guilford County this year. It is no surprise that the special master drew an additional Democratic Senate district and an additional Democratic House district.

Wade’s race was competitive but the Democratic House district was anything but; a political unknown, Democrat Ashton Clemmons, won with 68 percent of the vote. It becomes even more obvious that this is a Democratic district when you realize that it was drawn to elect a minority and the Republican candidate, Troy Lawson, is black while Clemmons is white. So the voters in the district put party over race.

And that brings up a mistake made by the North Carolina Republican Party that contributed to Republican losses. The Democrats decided to run a candidate in every state House and Senate race and the Republicans did likewise, which shows a level of political wishful thinking that should not be found at the state party level.

In all but two counties in the state the Republicans drew the districts, and they drew the districts just like the Democrats did for 140 years – except a mirror image.

The way the majority party draws the districts is to pack as many voters of the minority party as possible into a district. But for their own districts the key is to create as many winnable districts as possible, which means you want to have a majority of the controlling party but not too large a majority.

So following this formula you had a bunch of districts that couldn’t possibly be won by a Republican and then far more districts that should be won by a good Republican candidate who ran a competent campaign.

It made sense for the Democrats expecting a blue wave to put up candidates in all those Republican leaning districts because, if the blue wave had materialized, they could have won control of the state House and Senate. But the blue wave was more of a large ripple so the Democrats made the Republicans spend some extra money on districts that they would have likely won anyway.

But what the Republicans did was put candidates in districts that they couldn’t win even in a year with a red tidal wave. However, the Republicans spent money, time and effort on those districts.

Lawson may be the best example of why this was a bad plan. As chairman of the Guilford County Republican Party he should have been helping all the Republican candidates in the county with their races, raising money and providing manpower. Instead, Lawson, at the insistence of the state Republican Party, was spending his time raising money and recruiting manpower for his own race that he had no chance of winning.

The same was true of other Republican candidates who are active party members such as Clark Porter, who lost to District 28 to state Sen. Gladys Robinson, Alissa Batts who lost to District 61 state Rep. Pricey Harrison, Kirk Collins who lost to District 60 state Rep. Cecil Brockman, and Peter Boykin who lost to District 58 state Rep. Amos Quick. Collins did the best with 31 percent of the vote the rest finished in the 20s.

They are all active party members and if they had not been working on their own races and recruiting people to help them they would have been working on the races of Republican candidates that actually had a chance of winning.

If you believe that campaigning makes a difference, it was an incredibly dumb move by the state Republican Party to insist that Republicans run in districts they could never win.

Barnes lost by nearly 10,000 votes, so it may not have helped him enough to make a difference, but Wade lost by 763 votes, which is close enough for more feet on the ground and more money to have made the difference.

So in Guilford County the result of the North Carolina Republican Party plan to run a candidate in every race may have cost the Republicans a Senate seat, and the Republicans got nothing in return.

But what the Republicans did to themselves in the judicial races was even worse. The Republican legislature made the races, including the Supreme Court race, partisan and then held no primary, so all the candidates who filed were on the ballot.

Republican Supreme Court Justice Barbara Jackson was up for reelection and in her race Democrat Anita Earls won with 49.45 percent of the vote because there were two Republicans on the ballot. Chris Anglin, who had been a Democrat up until just before he filed to run, received 16.40 percent of the vote while Jackson had 34.15 percent.

In judicial races most people don’t know much about the candidates, which is one reason the Republicans decided the races should be partisan. At least the voter knows the name of the candidate and their party affiliation. With only one Republican in the race it appears that Jackson would have eked out a narrow victory, but with two Republicans in the race Jackson lost.

The Republicans realized the mistake they had made and tried to have the “R” beside Anglin’s name removed on the ballot. But the courts stepped in and in legal terms said you made your bed now lie in it and Anglin kept the “R” and got more than enough votes to get Earls elected.

The Republicans could have done the same thing and talked another Democrat or two into running, but evidently didn’t think of it in time. The win by Earls gives the Democrats a 5-to-2 majority on the North Carolina Supreme Court, and if this were a sport it would be called an unforced error.

A similar result occurred in one of the races for the Court of Appeals where the two Republicans, Jefferson Griffin and Sandra Alice Ray, together had over 50 percent of the vote but the Democrat Toby Hampson won with 48.68 percent.

Overall in North Carolina the Republicans did fairly well. The state elected 10 Republicans and three Democrats to Congress, the same as in 2016. The Republicans held on to majorities in the state House and state Senate, but lost their super majority in the state House, and, if the unofficial results hold, the Republicans lost the super majority in the state Senate also. Although losing the super majority in the House is enough to completely change the legislature in Raleigh.

With veto-proof majorities in both the House and the Senate the Republicans were able to pass whatever they wanted and then override vetos by Democratic Gov. Roy Cooper. Without the veto-proof majority in the House, the Republicans will have to compromise with the Democrats because they won’t be able to override Cooper’s veto.

With the Democrats now having a 5-to-2 majority on the North Carolina Supreme Court there is little chance of the Republican legislature getting a favorable ruling from that court and, despite the fact that the judiciary is supposed to be impartial, the vast majority of partisan cases that come before the court, like redistricting issues, are decided on straight party line votes.

The political landscape in North Carolina was definitely changed by the election, but just how far reaching those changes will be won’t be known until the legislature goes back into session in January.

The 13 North Carolinians elected to Congress are in for a huge power shift, because, although the Republicans didn’t lose any seats in this state, they lost enough nationwide that the Democrats now have the majority. Whether Minority Leader Nancy Pelosi becomes speaker or someone younger with less baggage, it’s going to be different for the 10 Republicans to be sitting on the back benches while the three Democrats move to the front.