Two police sergeants were shot, one fatally, in an exchange of gunfire on Friday with a man suspected of breaking into a woman’s home, authorities said. The gunman also was killed.

Gov. Andrew Cuomo announced the New York Police Department sergeant’s death, saying in a statement the sergeant had “made the ultimate sacrifice in the line of duty.” The other sergeant, who was shot in the leg, was undergoing treatment at a local hospital, said Cuomo, a Democrat.

The gunman, Manuel Rosales, fired on officers who had stopped his car following a brief pursuit near a ballfield, a law enforcement official said.

A woman who had an order of protection against Rosales had called 911 after he broke into her home and stayed for hours, giving police a description of his car, the official said.

Officers on patrol pursued Rosales, pulled him over and were attempting to arrest him when he opened fire, said the official, who wasn’t authorized to discuss the ongoing case and spoke on the condition of anonymity.

News helicopter footage of the scene showed a red SUV mounted on a sidewalk pinned between a flatbed truck and a police vehicle.

Area resident Gary Mayo, a city worker, was home on a day off when he heard five or six booms.

“That doesn’t sound like firecrackers,” he said he thought.

From the terrace of his fourth-floor apartment he saw a swarm of police cars converging on a nearby street and could tell whatever happened was “something really big,” he said.

Rosales, 35, was listed as homeless in court records from July. A lawyer who previously represented him said he wasn’t violent.

The sergeant is the fifth New York Police Department officer to be fatally shot in the line of duty in the last two years.

The mayor’s office said a press conference was scheduled for later Friday evening.

———

Associated Press writer Jennifer Peltz contributed to this report.