BOZEMAN, Mont. (AP) — A Montana judge has set a $1 million bail for a man accused of using a tracker to follow a woman to a vacation rental apartment in Bozeman and then stabbing another man to death.

Prosecutors said Thursday the 41-year-old defendant was dangerous, and had been in the country illegally so was a flight risk. They said the victim also was in the country illegally and using fake identifications that made it hard to identify him.

Court documents say the defendant used a GPS device to follow the woman to an apartment where he encountered the victim and stabbed him. The defendant faces charges including deliberate homicide. He’s due back in court later this month.