(CNN) Police in a predominantly fundamentalist Mormon community along the Arizona-Utah border must retrain officers and hire an independent mentor after discriminating against non-members of the sect and turning a blind eye to church misconduct, a federal judge ruled Tuesday, stopping short of a 2016 request by the Justice Department to disband the entire force.

The Arizona judge's ruling, which follows a jury verdict in March of last year, caps a yearslong lawsuit brought by the DOJ against the joint police force of the community, known as Short Creek and made up of the polygamous followers of imprisoned church leader Warren Jeffs

"Religious discrimination threatens the Founders' vision of a society based firmly on principles of liberty and freedom of conscience," said Tom Wheeler, acting assistant attorney general for the Justice Department's Civil Rights Division. "No individual in the United States should be treated differently by a town or its police officers because of his or her religion. No religious leaders should be permitted to use the power of sworn law enforcement officers to hide their misdeeds and enforce their decrees."

The towns are home to a sect of the Fundamentalist Church of Jesus Christ of Latter Day Saints.

The 2016 trial lifted the veil surrounding a secretive society that practices plural marriage and believes God speaks to the faithful through the prophet, Jeffs. He is serving a life prison sentence in Texas for sexually assaulting two girls, ages 12 and 15, whom he considered "spiritual wives." Much of the government's testimony came from disaffected former FLDS members.

Justice Department attorneys contended that church leaders controlled who was appointed to the town councils and who held key city jobs. The appointees in turn controlled the shared water and police departments.

Witnesses testified that the cities denied outsiders water hookups and other services that church leaders received without question. Witnesses who had left the FLDS also testified about how they were spied on and harassed by local police and church security.

On Tuesday, Judge H. Russel Holland said he was "unpersuaded" by the government's request and called full disbandment "a last resort that should be employed only if less drastic remedies fail."

Instead, Holland ordered that the department submit to training, as well as hire new officers and an independent mentor to meet with the department's chief monthly to advise him "in the performance of his job and the conduct of the CCMO."

The judge's order will last for 10 years.

In a statement, an attorney for Colorado City said he was pleased with Tuesday's ruling and the rejection of the DOJ's request to disband the department.

"Such an extreme remedy was disconnected from the facts in this case and unsupported by the law. The ruling is a victory for municipalities throughout the country that have pushed back against government intrusion into their daily affairs," Jeffrey Matura said. "We now begin the process of improving the community of Colorado City and moving forward in compliance with the court's order."