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.

A man inside the unit at the Summit Street Apartments began shooting at the Guthrie County deputies and a local police officer, Iowa Criminal Investigation Division agent Adam DeCamp said. The wounded suspect finally surrendered after a roughly 90-minute standoff.

The wounded deputies and suspect were taken to Des Moines hospitals, DeCamp said. Their wounds weren't considered life-threatening and all three were listed in stable condition. Another law officer also suffered powder burns during the shootout.

Authorities haven't released certain details about the shootout, including the names of those involved, how many times each person was shot and why the deputies were serving the warrant.

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."