A St. Albans man was sentenced Wednesday at the Somerset County Courthouse in Skowhegan to 27 years in prison after admitting he killed his uncle nearly two years ago. Jeremy Erving, 26, pleaded guilty to murder in the shooting death of Randy Erving, 53, of St. Albans on April 7, 2016, in a plea agreement, according to the Maine attorney general’s office. After his arrest, Erving told police his uncle was his best friend and he had no idea why he’d killed him after the two had been drinking all day, a court affidavit said. “The plea agreement guaranteed a conviction for murder,” Assistant Attorney General Robert “Bud” Ellis, who prosecuted the case, said Wednesday in an email.