This combination of Oct. 14, 2016, file booking photos provided by the Sedgwick County Sheriff's Office in Wichita, Kansas., shows from left, Patrick Stein, Curtis Allen and Gavin Wright, three members of a Kansas militia group who were charged with plotting to bomb an apartment building filled with Somali immigrants in Garden City, Kansas. A federal jury on Wednesday found the three men guilty. All were convicted of one count of conspiracy to use a weapon of mass destruction and one count of conspiracy against civil rights. Wright was convicted of a charge of lying to the FBI. Sentencing is set for June 27. Credit: Sedgwick County Sheriff's Office | AP

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, Kansas, 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 — “the f—-ing cockroaches have got to go,” Stein declared — and their steady efforts to acquire bomb-making 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.

Defense attorneys argued the men were the naive followers of fake news who engaged in “locker room talk” and were entrapped by an FBI scheme, echoing President Donald 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 plowed his car into a crowd of protesters in Charlottesville, Virginia. Roof is the white supremacist who killed nine people at a black church in Charleston, South Carolina, 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.”

Follow the Bangor Daily News on Facebook for the latest Maine news.