SWAT officers used ballistic shields as they rescued a baby girl during a standoff with a gunman who earlier shot and wounded five patrol officers, including four while they moved to take the baby to safety, Phoenix police said.

Initial accounts of the incident Friday that left the gunman and a woman believed to be his ex-girlfriend dead and the baby unharmed hadn’t explained how police rescued the baby after the first attempt was thwarted.

All of the five wounded officers were expected to survive, police said. Four additional officers had minor injuries after being struck by shrapnel or ricocheting bullets, police said.

Also read | Kodak Black reportedly among 4 shot in Justin Bieber’s Super Bowl concert afterparty

In a statement released late Friday, police also said that after he shot one officer, the gunman tried unsuccessfully to drive out of the garage of the home where he later barricaded himself and was found dead inside hours later.

The getaway attempt was thwarted because a parked patrol car blocked his vehicle, the police statement said. “When he was unsuccessful, he went back into the house.”

Police on Friday identified the dead suspect as 36-year-old Morris Richard Jones III.

Also read | Oregon man confronting bear accidentally kills brother, then takes his own life

Federal court records showed Jones had a criminal history dating back to at least 2007, including convictions in Oklahoma for using a firearm during a drug trafficking crime and possessing a firearm after a felony conviction and in Arizona for conspiring to transport, for profit, people who were in the country illegally.

The woman died at a hospital after being found critically wounded in the home. Her name wasn’t released.

It wasn’t known whether Jones killed himself or died from shots fired by police. Sgt. Andy Williams, a police spokesperson, said Saturday no updates were available.

Also read | Toledo boxer Robert Easter Jr. shot multiple times during robbery, hospitalised

Police went to the home in response to a 911 call reporting the shooting of a woman.

The first officer was ambushed and shot as he approached the door but “was able to back away and find cover,” the statement said.

The second officer to arrive fired at Jones, who went back into the home, the statement said.

During the ensuing barricade situation, a man whose identity hasn’t been released stepped out of the front door, put a baby down and then surrendered to police, police said.

Officers then approached the front door to rescue the baby but Jones shot at them, wounding four with bullets as four others were struck by ricochets or shrapnel, police said.

After members of the police department’s Special Assignment Unit arrived at the scene, those officers used shields to reach the child, the statement said. “Jones also fired shots at the SAU officers during the barricade.”

Also read | Paris police use tear gas against Freedom Convoy-inspired protestors

“A baby is safe today because of our Phoenix police officers,” Mayor Kate Gallego said at a news conference near the scene.

The statement said police tried unsuccessfully to get Jones to leave the house. After using a camera to look inside and seeing that Jones wasn’t moving, police entered and found him dead, the statement said.

The statement didn’t describe the camera but a city councilwoman said a Glendale police drone assisted Phoenix police during the incident.

The man who brought the baby outside suffered non-life-threatening injuries. Williams said he’s a family member and is cooperating with police.

“No information suggests that he’s part of the ambush, but it’s an ongoing investigation,” Williams said Friday.

During the incident, neighbors took shelter from the gunfire.

Austin Michael, who had been working on a car he recently bought, told the Arizona Republic he took shelter in his pickup camper after seeing a police vehicle go by and then hearing gunfire before seeing more police vehicles and news vehicles arrive.

Michael said he saw an officer being loaded into an ambulance and TV crews take cover as bullets went over their heads. “That was so close, that’s when everything got extremely serious and it was not a joke anymore,” he said.