The tussle over who should replace Justice Antonin Scalia on the Supreme Court could prove a blessing in disguise for Republicans. After years of infighting, the GOP has an opportunity to unite in opposition to the appointment of a new justice by President Obama. In so doing, the Republican leadership could rebuild their credibility with voters, derailing some of the hostility ginned up by “anti-establishment” candidates like Donald Trump and Ted Cruz.

Republicans say they will not confirm an Obama pick to the Supreme Court. Democrats are crying foul, but really -- who cares what the Democrats think? It is this president’s legacy and that of the Harry Reid-led Democrats in Congress that the appointment of a new justice is such a momentous undertaking. President Obama’s unlawful executive actions and willful refusal to uphold laws on the books, piled onto divisive lawmaking, have led us to this point. That is the message that Republicans need to deliver: that they are reining in the extra-legal behavior of a renegade president.

Related: Supreme Court Battle Tests These Vulnerable GOP Senators' Reelection Chances

During Barack Obama’s presidency, Democrats have used every tool imaginable to push through favored legislation. They passed Obamacare, a policy that affects every American and that is unpopular to this day, without a single Republican vote. No such sweeping legislation had ever been adopted along such partisan lines. It was done with a combination of rule-making trickery and outright bribery -- shameful, but effective.

Democrats’ high-handed law making drove voters to elect a Republican House in 2010. The GOP won by a landslide, the biggest upheaval in Congress since 1948. Though Obama acknowledged the “shellacking” as he called it, the rebuke did not slow him down. He had after all vowed to “transform” America. Obama proceeded to make “recess” appointments to the National Labor Relations Board that turned out to be unconstitutional, unilaterally eliminated the work requirement of the welfare reform act, and implemented a contentious mini Dream Act, protecting young people from deportation.

Consequently, the angry country turned the Senate over to Republicans in 2014 and voted in the largest GOP majority in the House since World War II. President Obama memorably said during the campaign, “I am not on the ballot this fall… But make no mistake: These policies are on the ballot. Every single one of them.” He was correct – and the voters turned out in 2014 in droves to tell Obama just what they thought of his policies.

One observer noted that the 2014 “wave” lacked a theme and a leader, unlike the Contract for America election in 1994 or the “War on Terror” theme in 2002. He was missing the point; there was indeed a theme – and it was that Americans were sick and tired of Democrats’ imperious lawmaking.

Related: Republicans Gear Up for a Bitter Fight Over Scalia’s Supreme Court Seat

However, President Obama proved immune to the country’s criticism. Not once during this presidency has Obama acceded to the will of the people by softening a position or changing course. For years, voters cited job creation as their number one concern; the president put economic growth last place in his agenda. Instead, he focused on climate change, gun control and other priorities that ranked way down the list of voters’ interests.

In recent years, President Obama turned to executive orders and to regulations to accomplish what he could no longer achieve through the normal, constitutionally mandated process of working with Congress. In the 2014 State of the Union address he vowed as much saying, “So wherever and whenever I can take steps without legislation to expand opportunity for more American families, that’s what I’m going to do."

The reliance on executive actions and regulation has had two outcomes. One is that it created a serious rift among Republicans. Frustrated voters could not understand why, given control of Congress, GOP leaders could not overturn unpopular laws like Obamacare or prevent more “amnesty” mischief. Opportunists like Ted Cruz seized on this anger and created an “anti-establishment” campaign, railing against the GOP leadership who, in fairness, could do little in the face of a presidential veto.

The second outcome is that much of Obama’s activism has stimulated lawsuits and is now at the mercy of the Supreme Court. Among the numerous policies now under review by the court are Obama’s drive to protect millions of undocumented people from deportation and his regulations aimed at shutting down our coal industry. The first resulted from an executive order and the latter from amped-up EPA regulations.

Related: Senate Republicans Grow Uneasy Over Supreme Court Delay Strategy

Both circumvented Congress and both are considered by many to constitute an abuse of executive power. The Court’s involvement in these cases speaks to the essential balance of powers established by the Constitution. If the executive branch exceeds its authority, the Court must play referee.

Hence, the angst in Democrat circles over the appointment of a justice to fill the spot vacated by the death of Antonin Scalia. We now face a prolonged, ugly battle over Obama’s right to nominate a justice and the Senate’s duty to confirm the nominee. The liberal media will attempt to portray GOP resistance as typical chronic obstructionism. They will warn senators like Kelly Ayotte and Rob Portman, who face serious reelection challenges that their chances will dim. Let them.

Republicans need to counter that narrative with this: President Obama has acted unlawfully for years, with only the Supreme Court as a brake on his push towards unpopular programs. If the American people want to dismantle our energy industries, or open our borders indiscriminately, they can vote in Hillary Clinton or Bernie Sanders. The people will have a chance to choose. Heaven help us if they don’t choose wisely.