A bullet that hit two teenagers went through the front and out the back of one of the boys before lodging in the other’s stomach, police say.
The pair, aged 15 and 14, are in a serious condition in hospital following the shooting in Handsworth, Birmingham, on Friday.
They were on their way to a family Halloween party when they were shot.
It happened at about 20:15 GMT outside the private address they were heading to, the West Midlands force said.
Police think the weapon was discharged from a car which left the scene in Victoria Road.
Officers said they did not believe the boys were targeted deliberately.
Det Supt Maria Fox, who described the shooting as “outrageous and appalling”, said while the victims were teenagers, they were still children.
She said: “A bullet has gone through one of the victims (aged 15), all the way through him, so it’s narrowly missed his spine, liver and kidneys, and then it’s gone into the other victim (aged 14) and that was lodged in his stomach.”
The 15-year-old has serious internal injuries, while the 14-year-old has had surgery to remove the bullet.
Both are said to be in stable condition, and they have spoken to police.
Officers are trawling CCTV images of the area and have appealed for witnesses and motorists who may have dashboard camera footage of surrounding roads on Friday evening.