Ruling against Wyoming, a divided Supreme Court said Monday that century-old legal precedent does not invalidate an 1868 treaty giving Montana's Crow Tribe the right to hunt in a national forest.

The case at issue concerns how the treaty impacts Clayvin Herrera, a member of the Crow Tribe who was cited for two Wyoming misdemeanors in 2014 after killing three elk for meat that winter. Herrera and a group of his fellow tribesmen spotted the elk while on a hunt on the Crow reservation in southern Montana and pursued the animals across the border into Wyoming’s Bighorn National Forest.

Herrera did not have the required Wyoming license to hunt the elk, but challenged his charges based on the Second Treaty of Fort Laramie, a deal struck between the Crow Tribe and the federal government in 1868. In the treaty, the Crow gave up 30 million acres of their land in exchange for a reservation, while also preserving hunting rights on “the unoccupied lands of the United States.”

Herrera argued this provision prevented Wyoming from bringing charges against him for his hunt, but his claims gained no traction at the circuit court or at various appeals courts.

A jury convicted Herrera, who was ordered to pay $8,000 in fines and banned from hunting in Wyoming for three years. Herrera appealed, but again failed.

Oral arguments in January focused on an 1896 Supreme Court decision known as Ward v. Race Horse, which held Wyoming’s admission to the United States invalidated a similar hunting right in a treaty with a separate tribe.

Wyoming argued Herrera is prevented from raising his claims due to a 10th Circuit decision from 1995 that used Race Horse to hold the Crow Tribe’s right to hunt in the Bighorn National Forest ended when Wyoming was admitted to the union.

Herrera’s attorneys, meanwhile, argued a 1999 Supreme Court case – Minnesota v. Mille Lacs Band of Chippewa Indians – altered the Race Horse decision even if it did not expressly overrule it, fundamentally changing the 10th Circuit holding and allowing Herrera to make his claims.

On Monday, the Supreme Court ruled 5-4 that the Crow Tribe’s hunting rights established by the 1868 treaty did not expire when Wyoming became a state in 1890.

Justice Sonia Sotomayor wrote for the majority that the Wyoming Statehood Act does not indicate that Congress meant to end the tribal rights established by the treaty.

“The Wyoming courts held that the treaty-protected hunting right expired when Wyoming became a state and, in any event, does not permit hunting in Bighorn National Forest because that land is not ‘unoccupied.’ We disagree,” she wrote. “The Crow Tribe’s hunting right survived Wyoming’s statehood, and the lands within Bighorn National Forest did not become categorically ‘occupied’ when set aside as a national reserve.”

The majority found that the case is controlled by 1999’s Mille Lacs ruling, not the 1896 decision in Race Horse.

Mille Lacs considered an 1837 treaty that guaranteed to several bands of Chippewa Indians the privilege of hunting, fish­ing, and gathering in ceded lands…In an opinion extensively discussing and distinguishing Race Horse, the court de­cided that the treaty rights of the Chippewa bands sur­vived after Minnesota was admitted to the Union,” Sotomayor wrote.

She continued, “While Race Horse ‘was not expressly overruled’ in Mille Lacs, ‘it must be regarded as retaining no vitality’ after that decision. To avoid any future confusion, we make clear today that Race Horse is repudiated to the extent it held that treaty rights can be impliedly extinguished at statehood.”

Justices Ruth Bader Ginsburg, Stephen Breyer, Elena Kagan and Neil Gorsuch joined Sotomayor in the majority.

Justice Samuel Alito dissented, and was joined by Chief Justice John Roberts and Justices Clarence Thomas and Brett Kavanaugh.

Alito said Herrera should have been precluded from “relitigating the continuing validity” of the 1868 treaty provisions that was also debated in the 1995 case Crow Tribe of Indians v. Repsis, in which the 10th Circuit held that the hunting right at issue was revoked.

“Herrera contends that he is not bound by the Repsis judgment because he was not a party, but this argument is clearly wrong,” the dissent states. “Indian hunting rights, like most Indian treaty rights, are reserved to the tribe as a whole. Herrera’s entitlement derives solely from his membership in the tribe; it is not personal to him. As a result, a judgment determining the rights of the tribe has preclusive effect in subsequent litigation involving an individual member of the tribe.”

The majority had noted that the Mille Lacs decision came after and repudiated the reasoning in Repsis, so Herrera was not precluded from arguing the 1868 treaty survived Wyoming’s statehood.