WASHINGTON (AP/WNCN) — The Supreme Court gave Republican legislative leaders in North Carolina a win Thursday in an ongoing fight over the state’s latest photo identification voting law.

The 8-1 decision doesn’t end the more than three-year dispute over the voter ID law, which is not currently in effect and has been challenged in both state and federal court.

The decision just means that Republican legislative leaders can intervene in the federal lawsuit to defend the law.

“It’s great when you make an argument that you feel solid about, but it’s even better when the Untied States Supreme Court says you know what you were right,” said House Speaker Tim Moore (R).

A lower court had ruled the lawmakers’ interests were already being adequately represented by the state’s attorney general, Democrat Josh Stein.

Justice Neil Gorsuch wrote that: “Through the General Assembly, the people of North Carolina have authorized the leaders of their legislature to defend duly enacted state statutes against constitutional challenge. Ordinarily, a federal court must respect that kind of sovereign choice, not assemble presumptions against it.”

Justice Sonia Sotomayor dissented.

In response to the opinion today Deborah Maxwell, the President of the North Carolina NAACP also weighed in.

“We are disappointed in the majority opinion, and agree with Justice Sotomayor’s dissent. However, the NC NAACP welcomes the opportunity to vigorously continue our challenge to this discriminatory law.”

She continued, “Indeed, the NC NAACP is no stranger to the long fight for justice and the right to vote. Today we reaffirm our call to all North Carolinians to stand with us. We know there is no victory without a fight and it is incumbent upon all of us to fight for the full freedom to vote in every election, and for the very life of our democracy.”

North Carolina voters amended the state constitution in 2018 to include a voter ID mandate. Lawmakers then passed the law at issue in the case to implement the change. The law requires voters to show a photo ID to vote — whether it’s a driver’s license, a passport or certain student and local government identifications.

North Carolina Democratic Gov. Roy Cooper vetoed the measure, but lawmakers overrode his veto to pass the law. The state NAACP and several local chapters immediately sued in federal court to halt enforcement of the law, arguing that it discriminates against Black and Latino voters in violation of the Constitution and the federal Voting Rights Act.

House Speaker Tim Moore and Senate leader Phil Berger, both Republican, wanted to intervene in the federal court case to defend the law alongside lawyers for the state, saying Stein wouldn’t adequately fight for the law.

“I think what the Supreme Court is telling us is what we have felt all along, and that is that the people of the State of North Carolina deserve to have the laws that their elected bodies have passed defended in court, and just because we end up with someone in a particular position in state government that that person shouldn’t be able to frustrate the will of the people as represented by their elected House Members and Senate members,” Berger said.

Attorney General Josh Stein’s Office provided the below statement regarding the ruling:

“We’re still reviewing the court’s decision. Our office has and will continue to vigorously defend state law, and did not oppose the legislators’ attempt to join in that defense.”

In a statement, Governor Cooper said:

“Voting is a fundamental right and people should not have to face unnecessary hurdles to cast their ballots.  Courts have held that multiple election changes engineered by Republicans were discriminatory and unconstitutional and the legislation at issue in this case is yet another example.”

But a federal judge said no, that lawmakers’ interests were being adequately defended by lawyers in Stein’s agency. A three-judge federal appeals court panel ruled for the lawmakers before the full federal appeals court reversed the decision, ruling 9-6 that lawmakers should not be allowed to intervene.

As for the law itself, it was initially blocked by the judge in the case, who said it was “impermissibly motivated, at least in part, by discriminatory intent.” But the three-judge appeals panel reversed her decision and sent it back to U.S. District Court, where a trial has yet to start.

In litigation in state court, judges struck down the law as tainted by racial bias. North Carolina’s Supreme Court has said it will take up the case, but no date has been set for oral arguments.

Separately, North Carolina’s highest court has also already heard arguments in a lawsuit over whether the constitutional amendment mandating voter ID should have been allowed on the November 2018 ballot in the first place. A state judge had ruled that the GOP-controlled legislature lacked authority to put the amendment and one other on the ballot because lawmakers had been elected from racially biased districts two years earlier. That decision was later overturned on appeal before going to the state’s highest court.