A worker who was on the roof of a Bed-Stuy synagogue when a fire erupted was charged in connection with the blaze on Tuesday, an NYPD spokesman said.

Caesar Raynor, 71, of Wappingers Falls, New York, is facing two counts of reckless endangerment after he unintentionally started the fire that burned through the roof of B’nai Adath Kol Beth Yisrael synagogue on Patchen and Greene avenues in Bed-Stuy, according to police and fire officials.

The fire, which began around 9:10 a.m., was sparked when Raynor illegally used a propane torch on the flammable roof, the police spokesman said.

More than 100 firefighters battled the blaze, which burned for more than two hours, according to the FDNY. The fire was placed under control at 11:45 a.m.

The synagogue has been home to the B’nai Adath Kol Beth Yisrael congregation since 1967, according to the congregation’s website.

Three firefighters were taken to a hospital with minor injuries, a spokesman said.