A western Montana man has been charged in the shooting death of a 17-year-old boy after prosecutors said he set a trap in his garage to catch any would-be burglars because he was frustrated over recent thefts.

Markus Kaarma, 29, of Missoula made an initial appearance in Justice Court on Monday but did not enter a plea to the count of felony deliberate homicide filed in the death of Diren Dede, an exchange student from Hamburg, Germany.

Kaarma's attorney, Paul Ryan, said his client feels terrible about the death of the young man, but he was also was disappointed that the Missoula County attorney filed the charge.

Court records said Kaarma and his wife, Janelle Pflager, had set up sensors outside the garage, a video monitoring system in the garage and left the garage door open. Pflager said she put personal items that she had cataloged in a purse in the garage "so that they would take it."

Early Sunday, the sensors went off, and Kaarma and Pflager looked at the video feed and saw that someone was in the garage.

Kaarma went outside with his shotgun. He told investigators he heard a noise that sounded like metal on metal, and he was afraid the intruder would come out and hurt him. He said he did not see anyone in the darkened garage and did not communicate with anyone before sweeping the garage with four shotgun blasts. Dede was struck in the head and arm and died at a Missoula hospital, court records said.

Kaarma said he didn't want the suspect to get away and added that police can't catch burglars in the act, the affidavit filed Monday said.

Pflager told police that they had been burglarized two times within the last three weeks. Ryan said.

They were frustrated, on edge and felt someone in their neighborhood was watching them, Ryan said. The couple called police "and nothing was done," he said.

Pflager had made a list of the items in the purse so if it was taken she could attempt to track the thief, Ryan said. Despite the recent burglaries, they left the garage door open, prosecutors noted.

"They certainly didn't tell the kid to come in (the garage)," Ryan said. "He entered voluntarily."

On Sunday, a woman told investigators that Kaarma had told her that he had been waiting up for three nights with his shotgun to shoot a kid, court records said.

Dede was a junior at Big Sky High School, where officials set up brief support for students.

Justice of the Peace Karen Orzech set Kaarma's bail at $30,000.

Less than two hours before the Missoula shooting, a homeowner 350 miles away in Billings shot and wounded a houseguest he thought was an intruder.

The 19-year-old seminary student was making a phone call in the home's garage late Saturday when he was shot, Billings Police Sgt. Pat Curry told The Billings Gazette.

The student, who was not named, appeared to be shot in the chest, but the injury was not life-threatening, Curry said.

The homeowner, who also was not identified, probably won't face charges, Curry said.