MISSOULA, Mont. — Teenagers call it garage hopping. The goal was to sneak into an open garage, steal some beer or other items and slip away into the night. It was dumb and clearly illegal. It was not supposed to be deadly.

Around midnight on April 27, a 17-year-old exchange student from Germany named Diren Dede left the host home where he played Xbox and drained cans of Sprite to set off with a friend through his dark hillside neighborhood. They passed a home whose garage door hung partially open. Using a cellphone for light, Mr. Dede headed in.

Inside the house, motion sensors alerted Markus Kaarma, 29, to an intruder’s presence. Two recent burglaries had put Mr. Kaarma and his young family on edge, his lawyer said, and he grabbed a shotgun from the dining room and rushed outside. He aimed into the garage and, according to court documents, fired four blasts into the dark. Mr. Dede’s body crumpled to the floor.

While Mr. Kaarma has been charged with deliberate homicide, Mr. Dede’s death has set off an outcry an ocean away in Germany, exposing the cultural gulf between a European nation that tightly restricts firearms and a gun-loving Western state. In his defense, Mr. Kaarma is expected to turn to laws enacted in Montana five years ago that allow residents more legal protections in using lethal force to defend their homes.