A man accused of conspiring to bomb a Kansas apartment complex housing Somali refugees argued Wednesday that he was unaware his co-defendants intended to carry out the attack.

Gavin Wright made the argument in a redacted, 93-page court motion filed by his attorney that offers the first details at his defense strategy. Wright and two other men are charged with conspiring to detonate truck bombs at an apartment complex in Garden City, a meatpacking town about 200 miles (322 kilometers) west of Wichita.

Prosecutors said Wright and co-defendants Patrick Stein and Curtis Allen planned to carry out the attack a day after the November 2016 election. The three men, who were indicted in October, have pleaded not guilty.

The motion portrays Wright as a lonely man desperate to find friends after moving to Liberal, a town in rural western Kansas. It contends Wright believed the talk about surveillance of the Somali Muslim refugee community was only hyperbole.

His attorney, Kari Schmidt, filed the motion while asking a judge to release Wright from jail pending trial. Schmidt argued Wright wasn't dangerous or a flight risk, and that the government's evidence against him was weak.

The judge hasn't ruled on the request. A spokesman for the U.S. attorney's office, Jim Cross, said in an email that he anticipates the government will oppose Wright's release. Cross declined later to comment on Wright's allegations in the motion.

According to the motion, Wright struck up a friendship with Allen, who shared many of his political beliefs and his interest in survival prepping and training. Allen introduced Wright to a group associated with the Kansas Security Force citizen militia that included Stein and a confidential informant, according to the court filing.

Some members regularly gathered for Sunday morning coffee to vent their frustrations about then-President Barack Obama, what would happen if Hillary Clinton was elected president — and the Somali refugees living in southwest Kansas.

The conversations included hypotheticals about how to make explosives and destroy bridges, but it was the informant who turned the discussions to targeting Somalis living in Garden City, Schmidt wrote.

The informant told the group money was being wired to Islamic extremists, and that the Somalis had connections to the Mexican Mafia and were using drug proceeds to help finance jihad in the U.S., according to the court motion.

Wright accepted the claims as "banter," but the informant was actively radicalizing Stein and Allen, Schmidt argued. Wright agreed they should be prepared if members of the Muslim community in Garden City ever became a threat, but it was the informant who suggested taking pre-emptive action, Schmidt wrote.

"While his new friends feared President Obama, the Muslim Brotherhood, a United Nations invasion of the United States, and martial law, Mr. Wright had a much more fundamental and human fear: isolation and loneliness," Schmidt wrote.

"So when the Sunday group talk turned to undesirable topics, Mr. Wright went along with the talk to get along," the attorney added. "But Mr. Wright describes such talk as 'banter' that he never took seriously."

She said Wright was concerned about political leadership in the U.S., and had strong feelings about immigration and refugee policies, but didn't share the fears of his new social group.

Public Defender Melody Brannon, who represents Allen, said in an email that she had "nothing" in response to the Wright's allegations, adding the motion is unrelated to her client's status. Jim Pratt, who represents Stein, declined comment.