STUART, Iowa (AP) — A man opened fire on sheriff’s deputies serving a warrant at a central Iowa apartment complex overnight, wounding two of them and setting off a gunbattle in which he, too, was wounded, authorities said Friday.

The shooting occurred at around 10:40 p.m. Thursday in Stuart, about 35 miles (57 kilometers) west of Des Moines.

Authorities on Friday identified the injured officers as Guthrie County Sheriff’s Deputies Steven Henry and Jim Mink, and the suspect as 52-year-old Randall Comly.

The Iowa Division of Criminal Investigation said Comly began shooting at the deputies and a local police officer after they were let into the apartment. They returned fire, wounding Comly, who surrendered after a roughly 90-minute standoff.

Henry, a seven-year veteran of the department, and Mink, a five-year veteran, were both in good condition at a Des Moines hospital on Friday afternoon. Police said Comly remained at a Des Moines hospital in law enforcement custody with non-life-threatening injuries.

A Stuart police officer suffered a minor gunpowder burn in the shootout, officials said.

Some nearby apartment residents described the scene as chaotic. One of them, Natasha Peninger, told station KCCI that she and her children fled at an officer’s urging.

“The cop banged on the door, and he said, ‘You got to hurry up and go and head north,'” Peninger said. “I just grabbed my kids and left.”