A Maryland judge says a man who's been locked up 37 years for the fatal shooting of a deputy has served enough time.

Friday's decision by a judge in Hagerstown means 68-year-old Roberto Rezek (REH'-zek) of Fairmont, West Virginia, need not die in a Maryland prison.

Rezek still may face six to 12 years in Pennsylvania for convictions for crimes committed there in 1977, two years before his accomplice in a gun-shop burglary killed Garrett County Sheriff's Deputy David Livengood.

Rezek was convicted in 1979 of first-degree murder and sentenced to life plus 15 years. His conviction was reversed in 2011 because the trial judge gave improper jury instructions.

Rezek pleaded guilty Friday to first-degree murder, averting a retrial. The judge ordered a suspended life sentence with credit for time served.