Gulfport man pleaded guilty to his seventh felony. Then he asked for leniency.

A Gulfport man considered a habitual criminal will spend 30 years in prison after pleading guilty to armed robbery of a pharmacy.

Ian Sims, 29, was sentenced this week at the Harrison County Courthouse.

Sims walked into the Walgreens Pharmacy at Cowan and Pass roads wearing a disguise on April 23, 2015, said District Attorney Joel Smith in a press release. Sims passed a note to two pharmacy clerks, saying he had a gun and wanted prescriptions. He then showed the clerk the gun handle tucked into his waistband.

While one clerk stayed with Sims, the other went to the back of the pharmacy to get the demanded prescriptions, Smith said. Once out of sight of Sims, the clerk alerted other employees, who then called Gulfport police.

Sims left the store on foot with four prescription bottles.

“As the defendant was walking away from the store, a Gulfport Police officer arrived on scene and took the defendant into custody in the Walgreens parking lot. During a subsequent search of the defendant, the officers found the note that was passed to the clerks, the gun and the prescription medication given to him by the pharmacy clerks,” said Assistant DA Matthew Burrell, who prosecuted the case.

Sims asked Judge Lisa Dodson for leniency at his sentencing, Smith said, pointing out that he was not a Mississippi resident.

Dodson told Sims that he had terrorized the clerks. She also reviewed his criminal history, which included six prior felony convictions, including two for robbery, which occurred in other states.

Dodson then sentenced the defendant to 40 years in prison, suspended 10 years of the sentence, leaving 30 years to serve in the custody of the Mississippi Department of Corrections. As a habitual offender, Sims will not be eligible for parole or early release. Upon his release from prison, Sims also will spend five years in post-release supervision.