The incident started Friday when police got a call that a boy, 3, was missing from the children's section of the Milpitas public library, where he was with his mother.
Police searched the library, but couldn't find the child. Instead, they got a description of a man seen leaving with the toddler.
An alert went out with identifying information about the two.
Meanwhile, Tim Watson was driving his bus route in neighboring Fremont, California, and thought he saw a child matching the description aboard his bus.
Knowing he could put the child in danger, he opted not to alert any passengers of his suspicion.
"What I pictured in my mind was all the parents in front of the cameras asking for their child to be brought back home,"
Watson told CNN affiliate KTVU.
Watson, who is a father, devised a ruse to get a closer look at the child.
"I pull over and I hit the brake, and I said I'm looking for a green backpack and I wanted to go observe the young man and see if the description matched," Watson told the affiliate.
There was no green backpack. But he did spy red shoes on the toddler's feet, which matched the description of the abducted boy.
Confident he'd found the child the police were looking for, he made the call.
Less than an hour after the boy was reported missing, police got the call and sprung into action, meeting the bus at the Fremont BART station.
Officers confronted Alfonso David Edington, 23, as he exited the bus and pried the boy from his arms, Milpitas police said.
"All appearances are the child is unharmed," Milpitas Police Chief Steve Pangelinan said. He described the bus driver as an "absolute hero."
Edington is in custody. It was not immediately clear if he had a lawyer.