PITTSBURGH  In a scene that neighbors described as a war zone, a gunman fatally shot three police officers on Saturday morning as they responded to a domestic dispute between a mother and her son.

Chief Nathan Harper of the Pittsburgh police said the gunman, Richard Poplawski, 22, surrendered after a nearly four-hour standoff with SWAT team officers.

“We have never had to lose three officers in the line of duty in one call,” Chief Harper said at a news conference in the lobby of police headquarters on the North Side of the city.

The American flag and the Pittsburgh flag flew at half-staff just outside the building to honor the slain officers. They were Eric Kelly, a 14-year veteran of the force and married father of three daughters, and a pair of two-year department veterans, partners Stephen Mayhle, a married father of two daughters, and Paul Sciullo III, who was engaged to be married.