Deputies arrested William Shultz at a hospital six hours after the stabbing in Discovery Bay.
Officials say Shultz was being treated in the emergency room at a Kaiser hospital in Antioch when a nurse recognized him from pictures on social media.
Officials also said Shultz spent the night at a home in Discovery Bay. Neighbors say five children lived there and it is believed Shultz may have been friends with one of the older siblings.
This is a crime difficult to comprehend. "This is such a family oriented community that felt so safe," Eden Tamayo said.
Contra Costa Sheriff's Deputies say the boy stabbed in his home along Frost Way in Discovery Bay likely knew his alleged attacker.
"We believe that the suspect is friends with one of the siblings of the house," Contra Costa County Sheriff's Office Lt. Ken Westermann said.
The boy died from his wounds after family members drove him to Brentwood's John Muir Hospital.
Meanwhile Contra Costa Sheriff's Deputies searched for Shultz who had taken a truck from the home's driveway and sped away.
"We don't know where he's headed at this time," Westermann said.
Neighbors searched for answers to the bizarre crime. "It's so out of the blue that as long as we've lived here as long as we've had kids, half the time we wouldn't lock our doors," Tamayo said.
Word spread quickly in the small community with some telling ABC7 News, Shultz may have recently been treated for mental health issues.
Investigators say they're looking into it.
As the victim's family left John Muir Hospital, a friend ushered them away, saying they had no comment at this time.
The loss is clearly devastating. "And of course to have it happen to a child is just completely heartbreaking," Tamayo said.