WASHINGTON (AP) \u2014 The Supreme Court gave Republican legislative leaders in North Carolina a win Thursday in a fight over the state's latest photo identification voting law. The 8-1 decision does not end the three-year-plus dispute over the voter ID law, which is not in effect and has been challenged in state and federal courts. The Supreme Court's ruling just means that the legislative leaders can intervene in the federal case to defend the law. A lower court had ruled the lawmakers' interests were being adequately represented by the state's attorney general, Democrat Josh Stein. Justice Neil Gorsuch wrote: \u201cThrough 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.\u201d Justice Sonia Sotomayor dissented. 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 put in place the change. The law requires voters to show a photo ID to vote \u2014 a driver's license, a passport or certain student and local government identifications. Democratic Gov. Roy Cooper vetoed the measure, but lawmakers overrode it. The state NAACP and several local chapters immediately sued in federal court to halt enforcement, arguing that the law discriminates against Black and Latino voters in violation of the U.S. Constitution and the federal Voting Rights Act. North Carolina's House speaker, Tim Moore, and Senate leader, Phil Berger \u2014 both Republicans \u2014 wanted to intervene in the federal case to defend the law alongside lawyers for the state, saying Stein would not adequately fight for the law. 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. Berger praised the Supreme Court ruling, saying that previous opposition by Stein and Cooper to voter ID had resulted in \u201cintentionally sandbagging\u201d the law\u2019s defense. \u201cNorth Carolinians overwhelmingly support voter ID, and they deserve nothing less than the strongest representation from those who would uphold the will of the voters and our constitution, not a tepid defense by an attorney general who has a record of opposing voter ID,\u201d Moore said in a news release. A spokesperson for the attorney general's office, Nazneen Ahmed, wrote in an email that Stein \u201chas and will continue to vigorously defend state law\u201d and did not formally oppose the legislators\u2019 efforts to join in the defense. In a legal brief to the justices, Stein and other state lawyers wrote that respect needed to be given to the executive branch\u2019s powers to defend the state in court. As for the law itself, it was initially blocked by the judge in the case, who said it was \u201cimpermissibly motivated, at least in part, by discriminatory intent.\u201d 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, where a ruling is pending. ___ Robertson reported from Raleigh, North Carolina.