KEARNEY, Neb. — A Kearney woman will spend years in prison after shooting a police officer in the leg while in the hospital.

Buffalo County District Court Judge Ryan Carson sentenced 32-year-old Alicia Martinez to eight to 15 years in prison on Tuesday morning. Martinez pleaded no contest to second-degree assault. Prosecutors and court officials say she was in the hospital because of meth use in February. While in the hospital, a police news release says she grabbed an officer's gun and shot the officer in the leg while the gun remained in the holster.

During the hearing, the defense attorney asked for the low number of the sentence to be as small as possible because Martinez doesn’t have a history of violent crime.

The state’s attorney said Martinez is lucky that others didn’t get injured in the incident. She said the video of the hospital interaction made it obvious that Martinez intended to take the weapon and then shot the officer. The state recommended a maximum sentence of 15 years because the victimized officer believes Martinez should have a chance to better herself later in life.

Martinez told the court that she was sorry. She used the word “if” when describing her actions because she says she can’t remember the interaction. In his comments, Carson took issue with her using the word “if” and said it showed that she struggled to take responsibility for her actions.

Carson read quotes from the officer’s victim impact statement and cited them as reasoning to comply with what he viewed as a generous plea deal. The officer said he “did not harbor any animosity” toward Martinez. The officer’s wife said Martinez is “not an inherently bad person” and that “some sad people make bad choices.”

Martinez will receive credit for 211 days already served. If she earns good time, she will be eligible for parole after three years and five months. Carson says he designed the sentence so that she could be on parole for four years, which he believes would help Martinez to overcome her addiction issues.