The shooting happened at about 8:20 p.m. Sunday. Police said a 26-year-old man was shot in the arm by another man after talking to a woman in the suspect's car at a gas station near state highways 1 and 92.
Deputies from the Alameda County Sheriff's Office located the suspect's car in a motel parking lot in Hayward, police said. Deputies staked out the vehicle and watched as a man and woman entered the car and drove away.
A short time later, deputies pulled over the car in San Leandro and arrested the pair, Brandon Michael Sargentini, 29, and Samantha Nicole Warner, 19.
Half Moon Bay police stepped in, taking custody of the suspects. Using a search warrant obtained for the motel room, police recovered a handgun believed to have been used in Sunday night's shooting.
Police said both suspects admitted their involvement in the shooting to Half Moon Bay investigators.
They were later booked into San Mateo County Jail without bail on suspicion of attempted murder and use of a firearm during a felony.
The pair's arrest stemmed from cooperation between several law enforcement agencies.
Approximately two hours before the shooting, a city of San Mateo police officer had briefly stopped a suspicious vehicle leaving a San Mateo motel but then released the occupants.
When a countywide broadcast was sent out later that day, the officer noted the similarity between the occupants of that car and the shooting suspects.
Half Moon Bay investigators were then able to obtain a photograph of Sargentini, who police said was identified by a witness as the shooter.
"This is just another example of the tremendous cooperation law enforcement enjoys in San Mateo County and throughout the greater Bay Area," Half Moon Bay Police Chief Don O'Keefe said.
"I truly believe in the saying that cooperation is the key to effective law enforcement," he said.