Luis Lombera was sentenced Friday in San Mateo County Superior Court to seven years in prison with credit for 485 days served, Assistant District Attorney Karen Guidotti said.
He had faced 30 years to life in prison if convicted of attempted murder in connection with the Sept. 10, 2008, shooting.
Lombera pleaded no contest on Sept. 22 to being a felon in possession of a firearm and using a firearm to inflict great bodily injury, in exchange for the sentence, Guidotti said.
"There were significant factual issues with the case," she said. "We're pleased with the resolution of the case. We think it was a wise way to go."
The shooting happened after Lombera and his brother tried to enter Primo's Pizzeria on El Camino Real in Redwood City in the late evening hours of Sept. 10.
A security guard stopped Lombera and his brother from entering, claiming the two were drunk. Lombera and his brother then had to be forcibly removed from the pizza parlor, prosecutors said.
Prosecutors said the brothers left but returned half an hour later with a gun and shot at the security guard and another worker standing in front of the restaurant.
The bullets missed the security guard and worker, but struck three customers also standing outside. Two of the three customers who were shot suffered great bodily injury, according to the district attorney's office. All had to be hospitalized
Lombera, who prosecutors said fired the gun and drove the getaway car, was arrested later that night for attempted murder.