The shooting occurred shortly before 2 p.m. in the 9200 block of Sunnyside Street, police said.
The boy was shot in the upper body. He was taken to Children's Hospital in Oakland where he is in critical but stable condition.
There was gunfire exchanged in the 9400 block of Sunnyside Street. Shell casings littered the sidewalk on two sides of the intersection. A wayward bullet struck the boy nearly two blocks away. He was playing in front of his family's home when he was hit, Bautista said.
No other injuries were reported and no suspects are in custody in connection with the shooting, Bautista said. Few people wanted to discuss the shooting out of fear, but those who did told ABC7 News the violence in Oakland needed to stop and that they would be praying for the young victim.
Bay City News contributed to this report.