A teenager shot himself and another boy outside a Victorville Walmart early Monday morning, police said.

The two boys, ages 13 and 14, were in a dirt field with a gun when one of them fired it, striking himself in the hand and the other boy in the backside, Victorville Police Department spokeswoman Tricia Blake said.

One of the boys then ran inside a nearby Walmart at 11896 Amargosa Road to ask for help.

Police were called to the scene around 7:40 a.m., and they arrived to find both boys with gunshot wounds that were described as being not life-threatening.

The two boys were taken to a hospital for treatment.

It’s unclear how the gun went off. Police are still investigating if it was an accidental shooting, but Blake said it appears they had the gun and intended to shoot it.

A gun and magazine were recovered from the scene, police said.

No further details were immediately available.