Authorities used an armored vehicle to help residents flee dozens of homes on the shore of Lake Ontario a day before Christmas. Police restricted access to the neighborhood, and officials said it was not clear whether there were other bodies in the seven houses left to burn.
The sister of the gunman, who lived with him, was unaccounted for. The gunman's motive was unknown.
The gunman fired at the four firefighters when they arrived shortly after 5:30 a.m. at the blaze in Webster, a suburb of Rochester, town Police Chief Gerald Pickering said. The first police officer who arrived chased the suspect and exchanged gunfire.
He lay in wait outdoors for the firefighters' arrival, then opened fire probably with a rifle and from atop an earthen berm, Pickering said.
"It does appear it was a trap," he said.
The gunman, William Spengler, had served more than 17 years in prison for beating his 92-year-old grandmother to death with a hammer in 1980 at the house next to where Monday's attack happened, Pickering said at afternoon news conference. Spengler, 62, was paroled in 1998 and had led a quiet life since, authorities said. Convicted felons are not allowed to possess weapons.
Two firefighters, one of whom was also a town police lieutenant, died at the scene, and two others were hospitalized. An off-duty officer who was passing by was also injured.
Another police officer, the one who exchanged gunfire with Spengler, "in all likelihood saved many lives," Pickering said.
Emergency radio communications capture someone saying he "could see the muzzle flash coming at me" as Spengler carried out his ambush. The audio posted on the website RadioReference.com has someone reporting "firefighters are down" and saying "got to be rifle or shotgun - high powered ... semi or fully auto."
Spengler lived in the house with his sister and mother, Arline, who died in October. He had originally been charged with second-degree murder in connection with grandmother Rose Spengler's death but pleaded guilty to a reduced charge of manslaughter.
The West Webster Fire District learned of the fire early Monday after a report of a car and house on fire on Lake Road, on a narrow peninsula where Irondequoit Bay meets Lake Ontario, Monroe County Sheriff Patrick O'Flynn said.
The fire appeared from a distance as a pulsating ball of flame glowing against the early morning sky, flames licking into treetops and reflecting on the water, with huge bursts of smoke billowing away in a brisk wind.
Two of the firefighters arrived on a fire engine and two in their own vehicles, Pickering said. After Spengler fired, one of the wounded men managed to flee, but the other three couldn't because of flying gunfire.
A police armored vehicle was used to recover two men, and eventually it evacuated 33 people from nearby homes, the police chief said.
The gunfire initially kept firefighters from battling the blazes.
The dead men were identified as Police Lt. Michael Chiapperini, 43, the Webster Police Department's public information officer; and Tomasz Kaczowka, also a 911 dispatcher, whose age was not released.
Pickering described Chiapperini as a "lifetime firefighter" with nearly 20 years in the department, and called Kaczowka a "tremendous young man."
The two wounded firefighters, Joseph Hofstetter and Theodore Scardino, were in guarded condition in the intensive care unit at Strong Memorial Hospital, authorities said. Both were awake and alert and are expected to recover.
Hofstetter, also a full-timer with the Rochester Fire Department, was hit once in the pelvis, and the bullet lodged in his spine, authorities said. Scardino was hit in the chest and knee.
At West Webster Fire Station 1, there were at least 20 bouquets on a bench in front and a bouquet of roses with three gold-and-white ribbons saying, "May they rest in peace," ''In the line of duty" and "In memory of our fallen brothers."
A handwritten sign says, "Thanks for protecting us, RIP." Two candles were lit to honor the dead.
Grieving firefighters declined to talk to reporters. A memorial vigil was planned for early Monday evening.
The shooting and fires were in a neighborhood of seasonal and year-round homes set close together across the road from the lakeshore. The area is popular with recreational boaters but is normally quiet this time of year.
"We have very few calls for service in that location," Pickering said. "Webster is a tremendous community. We are a safe community, and to have a tragedy befall us like this is just horrendous."
O'Flynn lamented the violence, which comes on the heels of other shootings including the massacre of 20 students and six adults at Sandy Hook Elementary School in Newtown, Conn.
"It's sad to see that that this is becoming more commonplace in communities across the nation," O'Flynn said.
Gov. Andrew Cuomo said the State Police and Office of Emergency Management were working with local authorities.
"Volunteer firefighters and police officers were injured and two were taken from us as they once again answered the call of duty," Cuomo said in a statement. "We as the community of New York mourn their loss as now two more families must spend the holidays without their loved ones."
Webster, a middle-class suburb, now is the scene of violence linked to house fires for two Decembers in a row.
Last Dec. 7, authorities say, a 15-year-old boy doused his home with gasoline and set it ablaze, killing his father and two brothers, 16 and 12. His mother and 13-year-old sister escaped with injuries. He is being prosecuted as an adult.