Two towns that are home to a polygamous sect went on trial last week in Phoenix, Arizona, in a case that revolves around claims of religious liberty and discrimination – reaching back two centuries to a problem posed by the founders of the US: what kind of wall separates church from state?

A Justice Department (DoJ) lawsuit challenged a religious sect’s way of life in the mountains of Utah and Arizona last week, bringing a group infamous for polygamy before a jury of their peers. The leader of the community, Warren Jeffs, is not himself on trial, as he is already serving a life sentence in Texas, for sexually assaulting children.

Nor is polygamy on trial, though it remains illegal in the state and US.

But both Jeffs and the practice will feature prominently in the lawsuit against two border towns – Hildale, Utah, and Colorado City, Arizona – and many say the lawsuit could reshape practices of the religious sect known as the Fundamentalist Church of Jesus Christ of Latter-day Saints (FLDS).

The FLDS is a radical offshoot of Mormonism, and has survived in the remote region since the 1930s, when the main Church of Latter Day Saints excommunicated leaders of the group.

The federal government has accused the towns of operating as a de facto theocracy that discriminates against non-believers, and of violating the US constitution with practices such as denying residents fair access to housing.

But beneath the technical language is a stubborn sore – the isolated FLDS community that for decades has been known for men having dozens of wives, girls being married off as young as 12 and families being torn apart on the word of church leaders as they sought to keep tight control within their radical religion.

“I’m really pleased that the federal government is bringing this legal action,” Salt Lake City-based trial lawyer Roger Hoole told the Guardian.

“The officials in this community are more loyal to their religious leaders than they are to the law of the land, and I’m hoping that the evidence the DoJ has accumulated over the last two years will lead to these towns being separated from the fundamentalist church so they can operate like a normal American town.”

Hoole has fought dozens of cases on behalf of parents who allege they have been thrown out of the community, and sometimes forcibly separated from children and spouses.

In opening arguments in Phoenix last week, the government argued that town officials are chosen by the men who head the FLDS. Public servants such as the police or the mayor are not just members of the church, the government argues, but do the bidding of the FLDS leaders in their public duties.

“The evidence will show the control that these men have over city officials and police officers to achieve their own objectives, the objectives of the FLDS church,” DoJ prosecutor Jessica Clarke told jurors.

“Their plan was to deny basic rights and freedoms to those non-FLDS families so they pack up and move away,” she said.

Defense attorney Blake Hamilton argues that town officials have no bias, and that federal authorities intend to deny religious freedoms and use the civil case to attack residents broadly, because they are members of the FLDS.

“It’s tempting to lump them all into a category as brainwashed cultists,” said Hamilton. “I believe [the government] is targeting people because they’re different.”

The Justice Department declined to comment on the trial, nor did it speciy what relief or punitive measures it seeks from the towns.

But if the government wins, Hildale and Colorado City would almost certainly loosen the grip the FLDS has on its followers, who are born into the religion and brought up home-schooled and without free access to television or the internet.

Hoole believes the towns could have their charters, the basis of their municipal power, taken away, with authority handed over to a judge, county authorities or a federal receivership.

He added that police departments could potentially be disbanded and a new team of county officers put in place. Government attorneys have suggested that police chiefs are appointed by church leaders, and that officers do not respond to emergency calls from non-FLDS residents.

There could also be heavy financial penalties for the town, which could weaken the overall influence of FLDS leaders, who would probably have to pay the cost.

Many wonder why the sect was not prosecuted long ago, given that polygamy is banned in the Utah state constitution, or how the group has survived with its leader in prison.

For years, deserters and critics have accused Jeffs of running the FLDS from behind bars, guiding his flock through letters and phone calls to his brothers, Lyle and Nephi, who run the community from a giant, walled compound in town. But although many have left the sect since Jeffs’s conviction, others stay and do not believe he committed any crimes.

“This federal lawsuit is long overdue,” said Buster Johnson, the supervisor of the Arizona county that contains Colorado City. “State officials have turned a blind eye to the FLDS and too many elected officials have not had the courage to deal with this lawless town in their own backyard.”

Johnson said many elected officials in charge in both Arizona and Utah were either Mormons or unwilling to upset the Mormon church by taking actions “like washing the religion’s dirty history in public”. He added that gathering the evidence for search warrants or prosecution against a secretive community has always proved difficult.

As for polygamy, practice does not necessarily mean prosecution.

When polygamy was outlawed in Utah more than a century ago by the Mormon church, some fundamentalists formed breakaway enclaves, of which the FLDS is one of the largest and most distinctive. Shunned by the mainstream Mormon church and largely ignored by authorities, most polygamists simply marry in spiritual but not legal ceremonies.

The unregistered weddings, usually performed by a religious leader, do not exist under a technical reading of the law that would prohibit multiple marriages.

Hoole said that few of these families, which often comprise a man, so-called “sister wives” and children in one large home, register births with the authorities.

Utah used to ban cohabitation, but that law was struck down by a court in 2013 in a case brought by Kody Brown and his four wives, the stars of the TLC reality TV series Sister Wives.

That in effect decriminalized polygamy in Utah, although the state has appealed against the ruling.

Hoole said that Utah and Arizona have generally not enforced polygamy or bigamy laws “unless it involves other crimes, such as underage girls or other forms of abuse”.

Johnson said the FLDS practiced child marriage more or less unhindered for years because it was so rare for victims, who are born into the religion and kept isolated from mainstream society, to testify against their families and the church.

Jeffs was finally imprisoned after Texas authorities raided a compound and found evidence that he had taken a 12-year-old as one of his dozens of wives.

Hoole said that the group’s practices had gone unchecked for too long: “Polygamy hurts children, hurts women and men and hurts society.”

For critics of the FLDS, the trial has raised hopes that the group will dissolve as the outside world reaches the isolated community.

“There is a constant stream of people leaving these days,” Hoole said. “Individuals and families that want to get back together with those who have previously left or been kicked out by the leaders. People want to be mainstream citizens and it really helps that the government has brought this case.”