A roach-infested apartment in New Jersey exploded after fumes from bug-killing spray built up and ignited, sending two adults and a child to a hospital.

The explosion happened Wednesday night after an occupant was spraying insecticide, got a headache and opened a window, Asbury Park Fire Department spokesman Garrett Giberson told the Asbury Park Press.

Oxygen from outside the apartment combined with the fumes and a stove's pilot light to cause the explosion, he said.

The blast blew out the first-floor apartment's windows, bent the front door and damaged the kitchen.

The three people are lucky they weren't seriously injured, Giberson said.

The home was still crawling with cockroaches when firefighters arrived, he added.

The American Red Cross is providing shelter for the three-story complex's tenants.