SALT LAKE CITY — One man was arrested after police say he accidentally shot his 14-year-old friend in the back while they were traveling in a car Tuesday night.

A 14-year-old boy told police he was driving around with his brother and friend in Salt Lake City on Tuesday.

“The victim said he was riding in the front passenger seat when he heard a loud bang and felt he had been shot. During this investigation it was determined that the gunshot came from the back seat, inside the car,” the affidavit states.

Salt Lake police were notified of the incident by doctors at Primary Children’s Hospital where the teen was treated for his injury, according to the affidavit. Salt Lake police on Wednesday said the boy was “stable.”

Sergio Manuel Ventura, 18, was arrested for investigation of shooting in the direction of a person, possession of a firearm by a restricted person and marijuana possession.

Ventura told detectives that the group had been “driving around smoking a blunt” and that “he was messing with the gun in the back seat when it went off. The bullet went through the seat and struck the victim in the lower back,” the affidavit states.

Police searched the vehicle and found “an obvious bullet hole in the seat along with bullets and marijuana. The firearm was located in a storm drain a short distance later,” police wrote.