Prosecutor John Schneider presented footage of the incident in a court hearing for Williams on Tuesday night. In the footage, Williams can be heard talking on the phone with someone prior to Moldovan approaching him, the police probable-cause statement said.

“He’s heard on body camera before the crimes occurred, saying something like he was going back to jail. A short time later, he shot at police presumably to avoid any apprehension,” said Schneider.

After approaching Williams, Moldovan asked if he had any weapons on him, which Williams denied but then “produced a handgun from his waist area, raised it at the officer and fired multiple times,” the statement said.

Moldovan fell after the first shots, but Williams “continued to shoot the officer even after the officer was on the ground,” Schneider said.

Moldovan is in a local hospital and is still in “extremely critical” condition, the police department said in an email.

After Moldovan fell to the ground and was shot again, Williams dropped his gun and tried unsuccessfully to yank the unresponsive officer’s handgun from his holster and then fought with a second officer before being arrested with the help of a third officer, the statement said.

The incident began as officers were searching for the driver of one of several cars reportedly driving erratically nearby.

A police probable-cause statement made public Wednesday said the officer suffered up to eight gunshot wounds, including one to his head.

Williams faces charges including attempted first-degree murder, according to a police statement and court records. A judge has ordered Williams held for lack of $3 million cash bond.

No defense attorney participated in the hearing for Williams, and court records did not list one who could speak on his behalf.

Williams has nine prior felony convictions, including for armed robbery, aggravated assault and endangerment, the probable-cause statement said. Williams was sentenced to multiple prison terms in 2017 and was released in 2020, Arizona corrections department records show.

The Associated Press contributed to this report.