Faulty wiring is being blamed for accidentally sparking a fire in Brooklyn.

It happened around 3:45 a.m. Thursday at Universal Ceramic Tiles on Bath Avenue in Bath Beach.

Fire officials say it started on the first floor of the two-story building.

It took crews more than three hours to get the fire under control.

Two firefighters suffered minor injuries and were taken to Staten Island University Hospital for treatment.