FARGO, N.D. — A Minnesota man who pleaded guilty to a federal hate crime for firebombing a Somali restaurant in North Dakota was sentenced Tuesday to 15 years in prison.

Authorities say Matthew Gust, of East Grand Forks, Minnesota, used an explosive made from a 40-ounce beer bottle to start a fire at the Juba Coffee House in neighboring Grand Forks in December. Prosecutors say Gust did not like Somalis and did not want them living in the area.

Gust’s attorney, Ted Sandberg, said during a 90-minute sentencing hearing that Gust was trying to get even after he and a family member had been previously robbed at gunpoint while they were working at a sandwich shop. Gust, 26, believed the robbers were Somali, Sandberg said.

“It is not an excuse. It is not a mitigating factor,” Sandberg said. “This was his way of striking back at the people who robbed him and humiliated him.”

U.S. District Judge Ralph Erickson, at the end of a 20-minute exchange with Gust, said the defendant’s decision to burn down the cafe over the burglary was silly since it’s not even clear if they were Somali.

“If you had been robbed by three Norwegian dudes, would you attack the Sons of Norway hall?” the judge asked.

Gust got the idea when he heard about someone spray-painting what some have described as a Nazi-like symbol on the business, along with the phrase “go home,” Sandberg said. Police have not charged anyone in connection with that vandalism, which occurred three days before the fire; Gust has denied any involvement.

“After a night of drinking, and a day of ingesting meth, Gust created the Molotov cocktail and decided he would settle the score with the robbers by damaging their national associates’ gathering place,” Sandberg said. “He would burn the Juba Cafe.”

Prosecutors say the fire caused an estimated $250,000 in losses, including damage to neighboring businesses. A few days after the incident, dozens of people of different faiths showed up for a candlelight ceremony outside the cafe.

An FBI agent testified Tuesday that Gust told family members he wished the Somali residents “would go away” and said he would shoot them if they came to his house. Sandberg said that even if Gust had a “pre-existing racial proclivity,” he had never acted on it.

Erickson said a combination of numerous medically diagnosed conditions, drug and alcohol abuse, and Gust’s “huge anger management and impulse controls problems” is why he wound up “sitting in front of a guy in a black dress getting a lecture.”