(CNN) Three men were sentenced Friday to at least 25 years in federal prison for attempting to blow up an apartment complex in western Kansas where Somali Muslims lived, a plot that unnerved that refugee community.

Patrick Eugene Stein and Curtis Allen of Kansas and Gavin Wright of Oklahoma chose the apartment complex in Garden City, a city of 26,000, partly because it contained a mosque, authorities said.

"Today's sentence is a significant victory against hate crimes and domestic terrorism," acting US Attorney General Matthew Whitaker said in a news release Friday from the Justice Department.

"The defendants in this case acted with clear premeditation in an attempt to kill innocent people on the basis of their religion and national origin. That's not just illegal -- it's morally repugnant."

The Somalis -- who settled in Garden City because of employment in the meatpacking industry -- appreciate the support they've received in the town and do not intend to harm anyone, according to one woman who spoke after the sentences were handed down.

Read More