REDWOOD CITY (BCN) — An 18-year-old man was sentenced to seven years in state prison for a series of armed robberies he admitted to committing last year in Redwood City, prosecutors said Friday.

Febronio Mendoza, 19, pleaded no contest in June to two counts of felony robbery with enhancements for firearm use and prior strikes in return for an agreed-upon sentence of five to 10 years in state prison, San Mateo County District Attorney’s officials said.

Prosecutors said Mendoza began by robbing a 7-Eleven store of $120 at 1700 Broadway in Redwood City around 3 a.m. on Feb. 19, 2014.

His second attempt at a robbery later that day failed, as he attempted to rob a Subway sandwich shop at 1926 El Camino Real, but the employee refused to hand over money, according to prosecutors.

This final robbery, at another Subway at 768 Woodside Road around 10:40 a.m., was successful. Prosecutors said Mendoza showed the store employee a handgun tucked into his waistband.

When Mendoza later came to the Redwood City Police Department to report an unrelated hit-and-run incident, police said he made admissions to all three robberies.

Prosecutors said he still owes restitution to robbery victims, but the amount hasn’t yet been determined.