HOUSTON (AP) — A man evicted from a Houston apartment house set fire to the building to lure tenants from their homes then shot five of them — killing three — before officers fatally shot him as firefighters battled the blaze, authorities said.

The attack happened at about 1 a.m. Sunday in a mixed industrial-residential neighborhood in southwest Houston. Police and fire crews responded to the apartment house after reports of the fire, police Chief Troy Finner said.

The gunman opened fire, possibly with a shotgun, on the other tenants as they emerged from the house, Finner said. Two were dead at the scene, and one died at a hospital. Fire teams rescued two other wounded men, who were hospitalized with non-life-threatening injuries, he said.

Michael James told Houston TV station KPRC that he was returning home from work when he was shot in the back.

“I saw the house was on fire, and I saw flames, so I called 911,” James said. “I didn’t get through, so I turned my back and headed back out the driveway. And all of a sudden, boom.”

The man opened fire as the firefighters battled the fire, forcing them to take cover until police officers spotted the prone gunman and fatally shot him, Finner said.

Finner said no firefighters or officers were wounded.

“I’ve seen things I have not seen before in 32 years, and it has happened time and time again,” Finner said. “We just ask that the community come together.”

A neighbor, Robin Ahrens, told the Houston Chronicle that he heard what he initially thought were fireworks as he prepared for work.

“I’m just fortunate that I didn’t go outside because he probably would have shot me too,” he told the newspaper.

He said the shooter, who had colon cancer, was behind on his rent, jobless and was recently notified that he was being evicted.

“Something must have just hit him in the last couple of days really hard to where he just didn’t care,” he said.