From left: Patrick Stein, Curtis Allen and Gavin Wright — members of a Kansas militia group — were found guilty of plotting to bomb an apartment building filled with Somali immigrants in Garden City, Kan. (Sedgwick County Sheriff’s Office/Associated Press)

A federal jury in Kansas on Wednesday convicted three right-wing extremists of plotting to massacre Muslim refugees living in an industrial town on the west side of the state.

Patrick Stein, 49, Curtis Allen, 50, and Gavin Wright, 50, were found guilty on charges of conspiring to use a weapon of mass destruction and conspiring to violate the civil housing rights of others. The men spent months plotting to bomb an apartment building housing Somali refugees and a mosque in Garden City, Kan., on the day after the 2016 presidential election.

They face a maximum sentence of life in prison.

During the four-week trial, prosecutors employed hours of recorded conversations and witness testimony to outline Stein, Allen and Wright’s intense hatred of Muslims, their desire to exterminate them to save America, and their steady efforts to acquire bombmaking materials. The men ultimately developed an attack plan involving four car bombs, which they hoped would kill as many Muslims as possible during the busy Friday prayer.

The men — at least two of whom had posted pro-Trump messages on social media, according to reports — at times invoked anti-Islam rhetoric expressed by Trump and his allies during the 2016 election. In an April 2016 conservation, Stein talked about killing Muslims – whom he called “cockroaches” – with weapons dipped in pig’s blood, echoing an apocryphal tale that Trump had referenced two months prior when he spoke admiringly of U.S. Gen. John J. Pershing killing early 20th-century Muslim insurgents in the Philippines using bullets dipped in pig’s blood.

Defense attorneys argued the men were naive followers of fake news who engaged in “locker room talk” and were entrapped by an FBI scheme, echoing President Trump in painting the FBI as conniving and unethical.

The successful prosecution resulted from an eight-month FBI investigation in 2016, using a paid undercover informant.

Muslim Advocates, a California-based civil rights group, praised the trial’s outcome Wednesday but also called for greater vigilance in preventing future plots.

“We cannot dismiss the disgusting rhetoric of these militiamen as mere ‘locker room talk’ as the defendants’ counsel argued. The stakes are simply too high,” the group said in a statement. “Anti-Muslim rhetoric has led to an unprecedented spike in hate violence and mosque attacks, intense radicalization of white supremacists, and a shocking disregard for the lives of American Muslims.”

Attorney General Jeff Sessions, whom civil rights advocacy groups also have criticized for disparaging Islam and supporting Trump’s travel ban on the citizens of several Muslim-majority countries, also released a statement commending the verdict and reaffirming the Justice Department’s commitment to fighting both domestic and foreign terrorism.

“The defendants in this case acted with clear premeditation in an attempt to kill people on the basis of their religion and national origin. That’s not just illegal — it’s immoral and unacceptable, and we’re not going to stand for it,” Sessions said. “Today’s verdict is a significant victory against domestic terrorism and hate crimes, and I want to thank everyone who helped bring the defendants to justice.”

Aloke Chakravarty, a former U.S. assistant attorney who prosecuted Boston marathon bomber Dzhokhar Tsarnaev, said it is uncommon for the FBI to devote such resources to a non-Islamic State terrorism case, particularly in a rural area, because the Justice Department’s National Security Division devotes the bulk of its resources, and therefore more undercover informants, to investigating foreign terrorist threats.

“Whereas in the so-called ‘non-Muslim’ cases,” Chakravarty said, borrowing terminology from a Muslim advocacy group’s recent report, which he had been asked to comment on, “there’s much less programmatic focus with resources and agents looking for potential conspiracies to commit terrorism or hate crimes.”

Counterterrorism experts say the imbalance in resources is partly responsible for what civil rights groups have long complained is an abundance of Muslim-targeted terrorism investigations, and the overzealous use of undercover informants to goad troubled young men along in their plots.

“You should be worried about the Dylann Roofs of the world as much as the Omar Mateens,” Seamus Hughes, the deputy director of George Washington University’s Program on Extremism, said last fall after a white supremacist allegedly plowed his car into a crowd of protesters in Charlottesville, Va. Roof is the white supremacist who killed nine people at a black church in Charleston, S.C., and Mateen was the Muslim man who killed 49 people at a gay nightclub in Florida.

“I think, sadly, we sometimes distill this debate into numbers of those killed or number of attacks,” Hughes added. “I think violence is violence, and politically motivated violence is politically motivated violence.”

Read more:

Trial opens for Kansas men accused of plotting to bomb Muslims

Three Kansas men calling themselves ‘Crusaders’ charged in terror plot targeting Muslim immigrants

Hate crimes spiked the day after Trump was elected, FBI data show