Two Maryland State Police troopers were shot and a suspect was fatally shot during a barricade situation and shootout in Allegany County, police said.

Maryland State Police are trying to figure out what pushed a man to try to kill his wife, shoot two troopers, then try to burn his house down and ultimately lose his life going up a second time against more troopers.

2 Maryland state troopers were shot after an hourslong barricade. (Photo: WBAL screenshot)

2 Maryland state troopers were shot after an hourslong barricade. (Photo: WBAL screenshot)

The troopers were flown by Maryland State Police medevac to Shock Trauma Center, police said. The troopers were shot in the leg and were treated and released, reports WBAL.

State troopers with the Cumberland Barrack were called shortly before 11 p.m. Thursday to a home in Little Orleans on a report of a domestic situation.

Police believe the suspect, identified as William Charles Mackenzie, 66, was inside the home when troopers arrived. Troopers learned from his wife that the two were arguing inside the home Thursday night when Mackenzie allegedly brandished a handgun and threatened her, and the gun went off as they struggled, police said.The wife escaped the home and called police.

Friday morning, after an hourslong standoff, preliminary information indicates members of the Maryland State Police Special Tactical Assault Team Element, or STATE Team, began an entry into the home and Mackenzie shot at the troopers, striking two of them in the lower extremities, police said.

"Troopers again tried to breach the front of the house. He came out again, brandishing a weapon. Fearing for their lives, the troopers fired on this suspect," Maryland State Police spokesman Ron Snyder said.

Mackenzie was taken to Washington County Medical Center, where he was pronounced dead Friday morning, police said.

A house fire, which is believed to have been ignited by Mackenzie, started as troopers began to go inside, police said. Fire crews were able to extinguish the fire, with help from troopers, police said.