Phoenix • An appeals court has upheld a ruling that concluded two towns on the Arizona-Utah border had discriminated against people who weren’t members of a polygamous sect, rejecting an argument that a judge made an error in finding there was a conspiracy between the church and towns.

The ruling Monday by the 9th Circuit Court of Appeals found there was enough evidence to show Colorado City, Ariz., and Hildale, Utah, had conspired with sect members to advance the objectives of Fundamentalist Church of Jesus Christ of Latter Day Saints, a radical offshoot of the Church of Jesus Christ of Latter-day Saints, which disavowed polygamy more than 100 years ago.

Federal authorities alleged the towns were operated as an arm of the sect, took orders from church leaders about whom to appoint to government jobs and that town employees assisted sect leader Warren Jeffs, who is now serving a life sentence in Texas for sexually assaulting girls he considered brides, when he was a fugitive.

The towns have denied the religious discrimination allegations and said the government was persecuting town officials because it disapproved of their faith.

The trial marked one of boldest efforts by the government to confront what critics have long said was a corrupt regime in the neighboring communities. It provided a rare glimpse into the communities that for years have been shrouded in secrecy and are distrustful of government and outsiders.

A jury in Arizona ruled in 2016 that the towns denied nonbelievers police protection, building permits and water hookups.

Because the federal law under which the case was brought didn't provide a right to a jury trial, the jury's verdict was considered advisory.

In response, the judge presiding over the trial later issued a judgment against the towns, ordered an overhaul of their government operations and put them under court supervision for a decade.

The 9th Circuit ruled the existence of a conspiracy was backed up by evidence that church leaders determined who served in governmental posts and that the police department shared by both towns turned a blind eye to the illegal activities of church leaders.

Though Hildale initially said it would appeal the judgment, the town withdrew its appeal, leaving Colorado City to challenge the outcome of the civil case.