The man who holed up in a Casper home for several hours and fired four shots during an armed standoff with law enforcement in June was sentenced to a term of imprisonment Wednesday in Natrona County District Court.

Judge Daniel Forgey sentenced 37-year-old Zachary Lovelace to a seven- to nine-year term in prison. Lovelace pleaded guilty in September to four counts of aggravated assault, and saw two other charges dismissed at his change-of-plea hearing.

Court documents say on the morning of Friday, June 2, a man was fishing off of Bessemer Bend Road when Lovelace approached him and asked to use the man's phone to make an emergency call.

The man loaned Lovelace his phone. In return, Lovelace pointed a gun at the man, threatened to kill him and then drove off with the phone.

Using an app, the victim's wife was able to track his iPhone, which was indicated to be inside a home in the 6800 block of Sharrock Road.

Natrona County Sheriff's deputies went to the home and spoke with Lovelace's stepmother, who said Lovelace had just entered the house with his son, a semi-automatic rifle, a pistol and a bag of ammunition.

She said Lovelace then went into the attic. Officers recovered the rifle from a bathroom, then asked Lovelace to surrender -- to no avail.

The Special Response Team was activated to execute the warrant. While they were inside the home, Lovelace fired two shots from within the attic. He later fired two more rounds.

Officers pumped pepper spray into the attic through a vent.

Throughout the five-hour standoff, a negotiator attempted to get Lovelace to surrender. A significant law enforcement presence amassed in the area, and officers blocked off streets as they worked.

Lovelace eventually kicked a hole through the ceiling of a bedroom, climbed out a window and started running with a black Glock in his right hand. However, Lovelace fell, and SRT officers took him into custody.

Police took Lovelace to Wyoming Medical Center to be medically cleared before he was booked into the Natrona County Detention Center.

As he was being driven from the hospital to the jail, Lovelace slipped his handcuffs to the front and caused significant damage to the interior of the patrol vehicle.

Although that charge was dropped as part of the plea deal, Lovelace did agree to pay restitution for that incident, which will total $3,572.77.

During Wednesday's sentencing hearing, public defender Rob Oldham told Judge Forgey that he believed the incident was "caused entirely by methamphetamine."

Lovelace's two brothers and stepmother made emotional statements on his behalf.

"This addiction has definitely changed him," older brother Jeremiah Lovelace said, adding that the family has been trying to help Zachary Lovelace "get back to the person he used to be."

"He's there for everyone," younger brother Sean Lovelace told the court. "If you were in trouble, he'd come get you."

"He just needs some guidance right now," Sean Lovelace continued.

"I was never afraid of Zach that day. I was afraid for Zach," his stepmother said. She went so far as to speak to the officers involved during the standoff.

"I begged them all: 'He is a good human being. Please don't kill him.' They were wonderful," she said.

Having struggled with methamphetamine addiction herself for several months in the 1990s, Lovelace's stepmother said, she knows "the insanity of it," but emphasized that it is possible to become a productive member of society.

"It is the devil's drug," she concluded.

"Judge, June 2 changed a lot of people's lives," Assistant District Attorney Dan Itzen told Forgey as he made his sentencing recommendation. "It's not a question of being a productive member of society."

Itzen said people should be able to offer assistance to strangers -- like the man at Bessemer Bend did -- without fearing they will become the victim of a crime.

Oldham, who recommended Lovelace serve six months in jail followed by inpatient drug treatment, praised the deputies who responded to the incident, saying they "did their jobs in a professional, safe and caring manner."