Members of a deeply conservative Amish community in Minnesota don't need to install septic systems to dispose of their "gray water," the state Court of Appeals ruled Monday in a long-running religious freedom case that went all the way up to the U.S. Supreme Court.

A three-judge panel ruled that the government "failed to demonstrate a compelling state interest" to justify overriding the religious freedom of the Amish families that challenged state regulations governing the disposal of gray water, which is water that's been used for dishwashing, laundry, and bathing, but not toilet waste.

THE AMISH AND ELECTRIC BIKES: HOW SOME GROUPS MAKE THE TRANSPORTATION METHOD FIT INTO THEIR FAITH

The Swartzentruber Amish in southeastern Minnesota are among the most traditional Amish groups in the country, U.S. Supreme Court Justice Neil Gorsuch noted in a 2021 ruling. It sent the case back to Minnesota courts for reconsideration in light of a high court decision a month earlier in a different religious freedom case. That ruling went in favor of a Philadelphia-based Catholic foster care agency that said its religious views prevented it from working with same-sex couples.

Swartzentruber Amish buggy

A Swartzentruber Amish buggy heads along Winter Road on Friday, April 21, 2017 in West Salem, Ohio. Members of the Swartzentruber Amish group scored a legal victory Monday against state regulations mandating septic tanks that violated their religious beliefs. (Phil Masturzo/Akron Beacon Journal via AP)

A Minnesota district court last September concluded that the government showed that it had a compelling state interest "of the highest order" in requiring the Swartzentruber Amish to use septic tanks to protect groundwater supplies in the area. The families then appealed again. The Court of Appeals sided with them Monday, and sent the case back to the lower court for an order in favor of the Amish.

Fillmore County in 2013 started requiring homes to have modern septic systems to dispose of gray water. The Swartzentruber Amish sought an exemption, saying their religion prohibits that technology. They sued in 2017. For years they had discharged their gray water directly onto the ground. They offered instead to use mulch basins filled with wood chips to filter the water, as allowed in some other states, but the government argued that mulch basins would be ineffective.

OHIO DEPUTY ENCOUNTERS 'DRUNK AMISH GUY' SLUMPED OVER IN MOVING BUGGY: 'THE HORSE KNOWS HOW TO GET HOME'

The federal religious freedom law that was at issue in the Philadelphia case "prohibits governments from infringing sincerely held religious beliefs and practices except as a last resort," Gorsuch explained at the time, urging the Minnesota court and local authorities to swiftly resolve the dispute.

"In this country, neither the Amish nor anyone else should have to choose between their farms and their faith," Gorsuch said.

CLICK HERE TO GET THE FOX NEWS APP

The Court of Appeals noted that the Swartzentruber Amish use some technology, but don't own or drive automobiles, and don't use telephones, electric lights or modern flush toilets. They supply water to their homes from cisterns and have always prohibited septic systems.