A man armed with a gun carjacked two vehicles, sexually assaulted a woman and briefly held a family of four hostage in their suburban St. Paul home Monday morning before officers fatally shot him trying to escape, police said.

The family escaped from the house in Cottage Grove, then moments later the man stole a vehicle from their garage, crashed it and fled on foot before he was shot, Cottage Grove Police Chief Pete Koerner said. A Cottage Grove officer and an officer from an assisting agency fired their weapons.

The Minnesota Bureau of Criminal Apprehension is investigating. No one else was injured in the shooting. The names of the suspect and the officers were not immediately released.

Police said the incident began in the St. Paul suburb of Maplewood at about 6 a.m. Monday. According to information from police in Maplewood and St. Paul, a woman was arriving at her job at a senior nursing home when she was kidnapped at gunpoint by a stranger, who drove her vehicle to her St. Paul home, where he sexually assaulted her.

The man tied the woman up, then left in another stolen vehicle, police said. The woman freed herself and called authorities.

Officers used the stolen vehicle’s GPS to track the man to Cottage Grove, where he carjacked another vehicle at gunpoint at about 8:30 a.m., then dumped that vehicle and entered a house. He then tried to flee in the family’s pickup truck, and was shot shortly after 9 a.m.

Koerner said the suspect was still armed when he was shot.