WICHITA, Kan. (AP) — A federal appeals court has upheld the convictions and sentences of three militia members facing decades in prison for their roles in a foiled 2016 plot to massacre Somali Muslims in southwest Kansas.

The 10th Circuit Court of Appeals rejected all the arguments raised by attorneys for Gavin Wright, Curtis Allen and Patrick Stein. The court was not swayed by claims that the men were entrapped and the method of selecting jurors was flawed.

Jurors convicted them in 2018 of conspiracy to use a weapon of mass destruction and conspiracy against civil rights for a scheme to blow up a mosque and apartments housing Somalis in Garden City, about 220 miles (350 kilometers) west of Wichita.

Stein, the alleged ringleader, was sentenced to 30 years in prison. Allen, who drafted a manifesto for the group, got 25 years. Wright, who helped make and test explosives at his mobile home business, received 26 years.

Before their sentencing, attorneys for the men had urged the court to consider rhetoric from former President Donald Trump that they said encouraged violence. Attorneys pointed to a Trump tweet at the time saying that “some very bad people” were mixed in a South American migrant caravan headed toward the U.S., calling it “an invasion” of the country.