A man was found dead of a self-inflicted gunshot wound after hefired gunshots at Phoenix police officers during a standoffSaturday afternoon at an apartment complex near Seventh Street and Bell Road, officials said.

Officers responded at about 12:30 p.m. to a call of gunshots fired at the complex, according to Phoenix police Sgt. Tommy Thompson, a department spokesman. There was a domestic dispute between a 30-year-old woman and a 31-year-old man.

Resident Eric Mace said his bathroom window faces the suspect's door, and Mace was looking through the window when he saw a woman run out of her apartment.

"She was barely dressed, she only had on a towel and she was screaming 'Call the police, call the police,'" Mace said.

The woman continued running, and a man came out chasing her. He was nude, and he couldn't catch her so he ran back into the apartment, Mace said.

"When he runs back in, you immediately hear about five or six gunshots," said Mace. That's when he called the police.

Police were talking with the victim when the man, still naked, came out and fired numerous gunshots in the direction of officers and patrol cars, Thompson said. Officers had to take cover, and no officers were shot.

Mace said the man came out of his apartment and "he has some sort of semi-automatic weapon in his hand and he aims it at them — blam, blam, blam — just starts firing at almost just at the police or at anyone that's moving down there really and that was it. He goes back to his apartment after that."

No officers fired their guns.

Police tweeted photos of their vehicles with bullet holes and a window shot out. The man shot a sergeant's vehicle about seven times, police said.

"The woman is safe, and again, none of our officers were shot by the gunfire," Thompson said during a briefing.

SWAT officers negotiated with the man for about three hours to come out, Thompson said. Over the course of that time, the man asked officers to shoot him.

The officers later entered the apartment and found the man dead from an apparent self-inflicted gunshot wound. Two dogs in the apartment also were shot.

"This is an example of Phoenix Police Department responding on the scene like we do the overwhelming majority of the times when there's a dangerous situation where we don't use gunfire -- in this case no Phoenix police officers fired any shots during the course of this incident," Thompson said. "It's unfortunate that a man lost his life, but he took his own life in this case."

Police did not identify the man or the woman.

No one else was injured, Thompson said.

Residents were told they can go back to their apartments about 5:40 p.m., except for ones who live in the same building as the shooter.

The incident is being investigated by police.

Check back at azcentral.com for updates.