The rifle discharged into the toe of 40-year-old Eric Smith in an upstairs apartment. The bullet pierced the floor and wounded the boy who was asleep in his bed in the downstairs apartment.
Both Smith and the boy, whom neighbors identify as Alex, were rushed to Valley Medical Center where they are in serious condition.
Residents of the Almaden Apartments say it's normally a quiet complex. No one knew Smith had any firearms.
Dionisia Pajuelo's 9-year-old son Scotty and the wounded boy are good friends.
"From a mother's point of view, it's just the hardest thing to go through," she said. "Like having to, you know, see your son go through so much pain and not be able to be something when he grows up like when he gets older. It's heartbreaking."
Police arrested Smith at the hospital for being a felon in possession of a firearm and ammunition and for negligent discharge of a firearm.
Eric Smith's sister-in-law Rosalind Bonds is hoping for the best.
"We're all praying that everything goes well, that he's okay," she said. "And we're asking for everybody to pray for him."
Rosalind Bonds, who is Barry Bonds' cousin, saw Alex all the time. He's the youngest of three siblings.
"Everybody sees Alex playing soccer or running with his scooter or swimming," she said. "He was really playful."
Neighbors say they will find it difficult to forgive what happened.
"That's a kid, that's a kid," said Almaden Apartments resident Ray Villasana. "When you mess with a kid, you're done. It's a wrap."