A San Diego man who robbed a Robstown convenience store at knifepoint in December has been sentenced to 25 years in prison.

Alejandro Lopez III, 41, pleaded guilty to aggravated robbery as part of a plea agreement. He was facing 25 years to life, but pleaded guilty instead of facing trial.

Lopez will not be eligible for parole until 2020 when he is 53 years old, police said.

Police said Lopez came to Robstown to commit a robbery and purchase illegal drugs.

Lopez, 41, was arrested at an apartment complex in Alice Dec. 10 on an outstanding warrant for aggravated robbery.

He was arraigned in Alice and transported to the Robstown Police Department where he was interviewed by Robstown detectives and later taken to the Nueces County Jail on the aggravated robbery charge.

Robstown police had said a Hispanic man walked into Amanda's Stop N Go at 309 Messer Ave. in Robstown at about 9:55 p.m. Dec. 1 while wearing a red bandana covering his nose and mouth.

Police said the robber displayed a pocketknife in his right hand and demanded that the store clerk open the cash register. The female clerk opened the register and the robber reached over and grabbed approximately $400 in cash, police said.

Lopez reportedly walked out of the store and headed north on foot.

Robstown police said store surveillance video helped identify the robber as Lopez and a warrant was soon issued for his arrest on the charge of aggravated robbery, with a $60,000 bond.

Lopez was spotted by Alice police the morning of Dec. 10 at a government apartment complex at 1000 Pierce St. He was discovered after his car was found on Grace and Pierce streets near the complex at about 10 a.m.

Alice police said Lopez was hiding between some vehicles and was noticed after he poked his head out at the wrong time.

Lopez was arrested on the Nueces County warrant while wearing flannel pajamas.

Robstown Police Chief Johnny Brown said Lopez decided to commit an armed robbery in Robstown in order to obtain heroin in the city.