WEST VALLEY CITY -- A shooting in West Valley has left one teenager in the hospital and another in juvenile detention.

It happened Thursday around 4 p.m. outside the Homestead Apartment Complex at 3650 South, 1950 West.

Police said a 16-year-old shot a 15-year-old in the abdomen. Cops said the 16-year-old boy was showing off a gun and this appears to be an accident.

It was a startling discovery for neighbor Brad Blair. Just after 4 p.m., the victim showed up on Blair's doorstep.

"He was still awake and everything, but he was bleeding pretty good," Blair said.

The victim was with a female friend. They were trying to call 911. Moments before, the teens were hanging out with a 16-year-old acquaintance outside the apartment building.

"It sounds like he tried to fire the gun a couple times, it wasn't working but at some point it did discharge," said Lt. Matt Elson of the West Valley City Police Department.

Lt. Lamont Cox described the moment the teen was shot.

"He's got it in his jacket, pulled the trigger and it goes off," he said.

"Everybody seemed more surprised than anything that it happened," Blair added. "The one gentleman, he's walking around and he was just sitting on the ground holding his stomach."

Elson said the victim is expected to be OK.

"He was transported to a local hospital,” he said. “It appears the injuries are serious but not life threatening.”

Moments after the shooting, police said the teen suspect took off with the gun.

"The information we got was when they called 911 he left," Cox said.

For a few hours police didn't know who the shooter was, but after witnesses identified him, cops arrested the teen at his home. He'll be booked into a juvenile detention facility for what investigators believe was an accident.

"He'd shown them the gun before, so they knew he had it,” Cox said.

It's unclear if the gun was brought to school, but police now have it in their custody. Investigators don't know how the teen got it, but police said his parents are aware of the arrest and the 16-year-old could face misdemeanor charges for having the gun and a possible felony charge for reckless endangerment.