BOISE, Idaho (AP) — An Idaho soldier sentenced for the thrill-killing of an Afghan civilian has been released from prison.

KTVB-TV reports that 25-year-old Andrew Holmes flew home to Boise on Sunday evening where he was greeted by dozens of friends and relatives at the Boise Airport. Holmes pleaded guilty in September 2011 to murder by an inherently dangerous act, possessing a finger bone from his victim, and smoking hashish.

He was sentenced to seven years in prison. In court he said he fired a heavy machine gun at a startled, unarmed man from 15 feet away after a co-defendant tossed a grenade at him. Holmes was one of five soldiers from Joint Base Lewis-McChord south of Seattle arrested in Afghanistan in 2010 after prosecutors said they killed three civilians for sport.