Detroit police said a man used a gun when trying to fend off a carjacker Monday night on the city's west side.

Police said the 42-year-old man was carjacked by a 19-year-old man at a gas station at 6 Mile and Evergreen roads. The man had a gun permit, police said, and fired his weapon at the carjacker.

The younger man fled in the man's Yukon Denali while the victim fired shots at him, police said.

The carjacker was killed when he drove the Denali into a tree about two blocks away from the gas station, police said. The sports utility vehicle flipped on its roof.

Police said they were not sure if the 19-year-old died from gunshot wounds or injuries suffered from the crash.

The initial victim of the carjacking became a suspect in a murder investigation, police said.

He was arrested and was in police custody Monday night.

Police said they were planning to submit the case to the Wayne County prosecutor's office.

More:Local News Headlines