WASHINGTON (AP) — The Supreme Court ruled Tuesday that Congress acted within its authority when it ended a lawsuit that began over a Native American tribe's Michigan casino.

The case was making its second appearance before the justices. Michigan resident David Patchak sued in 2008 after the Match-E-Be-Nash-She-Wish Band of Pottawatomi Indians, also known as the Gun Lake Tribe, got the go-ahead to build a casino on land near his property. Patchak said the casino, which is about a 3-mile (4.8-kilometer) drive away, would increase traffic and pollution and change the character of the area.

The first time the case was before the Supreme Court, Patchak was able to continue his lawsuit. But Congress soon passed a law that got the lawsuit dismissed. Patchak argued that Congress had improperly determined the result in his case.

Patchak's lawyer Scott E. Gant had argued that Congress went too far when it passed the law, violating the separation-of-powers principle in the Constitution.

But six justices disagreed with Gant and said Congress had acted properly. Justice Clarence Thomas wrote that the law Congress passed was "a valid exercise of Congress' legislative power" and "does not infringe on the judicial power." Three justices led by Chief Justice John Roberts dissented.

The Gun Lake Tribe's casino has now been operating for years in Wayland, Michigan, and is one of more than two dozen in the state. The casino has more than 2,000 slot machines and 50 tables for games including craps, roulette and blackjack. In 2016, the tribe paid more than $17 million to the state and local governments as a result of its casino operation.

Following the Supreme Court's decision, Scott Sprague, the chairman of the Gun Lake Tribe, said in a statement that it "ends a decades-long struggle, and ensures the Tribe can carry on our Elders' vision for growth and self-sufficiency."

The case is Patchak v. Zinke, 16-498.

___

Follow Jessica Gresko on Twitter at http://twitter.com/jessicagresko