FARGO, N.D. (AP) — Four police officers involved in a fatal shooting in eastern North Dakota have been returned to duty following an internal investigation, officials said.

Fargo Police Chief David Zibolski says the four officers did not violate any department policies in their encounter with 35-year-old Andrew Martinez on Aug. 1 in Mapleton. Police said they believed Martinez was having a mental health crisis when he was killed.

According to authorities, the four officers fired their weapons when Martinez, armed with a semi-automatic rifle, appeared in the doorway of a residence and pointed the weapon at them following a four-hour standoff.

Negotiators had urged Martinez to come out of the house without his weapon. Twenty to 25 rounds were fired by the officers and five gunshots struck Martinez, who died at the scene after life-saving measures were attempted, officials said.

The four officers were identified as Sergeant Travis Moser, Detective Josh Heller, Detective Ryan Jasper, and Investigator Jordan Korte. Last month Attorney General Drew Wrigley ruled the shooting was justified and lawful.