Luis Herrera entered the plea Tuesday in exchange for a maximum of two years in prison. He had previously faced up to four years in prison, according to Chief Deputy District Attorney Steve Wagstaffe.
CRIME MAPS: Track crime in your neighborhood
Herrera, who was arrested at his home four days after the Jan. 3 murder of 16-year-old Matthew Johnson, told police Johnson was stabbed after the teen and two friends threw a rock at a car Herrera was in, Redwood City police Capt. Ron Matuszak said.
Herrera is not believed to be the one who stabbed Johnson, and therefore was not charged with murder, Wagstaffe said.
Herrera was taken into custody Jan. 7 at his home on Hoover Street after several anonymous tips were made to the Police Department, Matuszak said.
The two boys who were with Johnson when he was killed told investigators they had been throwing rocks at cars. When a rock struck the car Herrera was in, the occupants became angry and began beating Johnson, Matuszak said.
Herrera was allegedly involved in the beating but said he did not know his accomplice had a knife, according to Wagstaffe.
Johnson's friends were not injured.
Herrera is in custody in lieu of $25,000 bail. He is scheduled to be sentenced Aug. 18.