CHAMBERLAIN, S.D. (AP) — A Chamberlain man who has admitted to threatening police officers will spend eight years in prison.

Gregory Weir was handed a 25-years sentence with 17 years suspended on Tuesday. He pleaded guilty in July to aggravated assault against a law enforcement officer.

The charge stems from a May 1 incident, when authorities say a Chamberlain woman called police because Weir had entered her mobile home, was drunk and had a gun. Records show he told the woman he would shoot police officers if they showed up.

When officers arrived, Weir fired a shot in an unknown direction. Police later searched the home and found a discharged firearm near the front door.

Weir's attorney Theresa Maule Rossow tells KELO-TV she believes the sentence gives her client "hope" while recognizing the "hard job" of law enforcement officers.

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

More From KXRB