HELENA, Mont. (AP) — A 26-year-old man who pleaded guilty to holding a convenience store clerk hostage for part of an 11-hour standoff last October has been sentenced to 15 years in prison.

The Independent Record reports Eric Scott Hamper of Helena was sentenced Wednesday to 20 years in prison with five suspended. He earlier pleaded guilty to kidnapping and criminal endangerment for the standoff at Friendly's gas station.

Court records say Hamper tried to rob the station with a .45-caliber semi-automatic pistol with the intention of committing "suicide by cop." Police say he held a gun to the clerk's head several times, and at one point fired the weapon in the direction of the clerk.

Authorities say Hamper released the clerk after two hours.