MISSOULA, Montana (AP) — Police in Montana received a judge's permission to test whether a homeowner was drunk or high when he shot and killed a 17-year-old German exchange student in his garage, a newly published court document reveals.

A police statement accompanying an April 28 request for a search warrant said Markus Kaarma may have had marijuana stolen from his garage in a previous burglary and that police found a glass jar of pot the day he shot Diren Dede.

Police believe Kaarma "may have been impaired by alcohol, dangerous drugs, other drugs, intoxicating substances or a combination of the above, at the time of the incident," the statement from Missoula police Detective Dean Chrestenson said.

District Judge Karen Townsend granted the warrant to draw Kaarma's blood to test whether any traces of intoxicants remained.

Kaarma's attorney, Paul Ryan, did not immediately return a call for comment on Tuesday. Ryan has said Kaarma plans to cite Montana's self-defense laws in pleading not guilty to the charge.

Kaarma, 29, is charged with deliberate homicide in the April 27 slaying of Dede, who is from Hamburg. Prosecutors allege Kaarma and his partner set up sensors and a video monitor, then left their garage door open the night of the shooting in Missoula.

Kaarma had been burgled twice before, and he told his hairdresser that he had stayed up for three nights waiting to shoot some kid, prosecutors said.

The search-warrant request says Kaarma's partner, Janelle Pflager, told a neighbor that someone had taken all the marijuana and pot pipes out of the garage in a previous burglary.

Pflager also told the neighbor her husband smokes marijuana in the garage, and police found a glass jar of marijuana in his pantry the day of the shooting, the search warrant said.

The night of the shooting, Kaarma and Pflager heard the sensors trip and saw a figure in the garage on the video monitor, prosecutors said. Kaarma took a shotgun out the front door and fired four shots into the dark garage, hitting Dede.

The boy was unarmed, and authorities have declined to say what he was doing in the garage.