A roach bomb exploded in a Brooklyn apartment Thursday, starting a small fire and injuring four people, officials said.

The blast at around 1 p.m. in a second-floor apartment on Hegeman Ave. near Amboy St. in Brownsville blew out window frames.

Two people suffered serious injuries and two sustained minor injuries in the bizarre incident. Medics took them to Brookdale Hospital.

Preliminary reports indicated a cat was killed by falling debris and two children were among the injured.