BAY POINT -- Sheriff's deputies arrested two men after the sound of gunfire late Sunday night led them to the victim of a shooting.

Deputies were patrolling the Solano Avenue area at 11:51 p.m. when gunshots alerted them to a man running down the street, according to agency spokesman Jimmy Lee.

The man got into the passenger side of a waiting vehicle and the driver sped off. Deputies followed and spotted the man they'd seen earlier jump out of the vehicle and start climbing over residential fences and running through backyards, Lee said.

They stopped the vehicle and detained the driver. Meanwhile, other deputies responding to the incident found a male shooting victim on the first block of Solano Avenue.

After sealing off the area and systematically searching residential properties, they found the man who had fled on foot hiding in a backyard, Lee said.

He was identified as Jesus Medrano, 20, of Oakland. Both he and the driver, identified as 21-year-old Giovanni Navarro of Walnut Creek, were arrested on suspicion of attempted homicide and are being held at the Martinez Detention Facility.

The shooting victim, a 22-year-old man, did not appear to suffer life-threatening wounds.