Five FDNY firefighters were injured early Thursday as they battled a raging blaze that ripped through a Brooklyn warehouse, officials said.

The inferno erupted around 12:30 a.m. on the first floor of the two-story restaurant supply warehouse on Monitor Street in Greenpoint, according to officials.

The blaze quickly rose to three alarms — and then four.

The injured smoke-eaters suffered non-life-threatening injuries, with three of them treated on the scene and two of them taken to Wyckoff Heights Medical Center.

There were no civilian injuries reported.

FDNY crews were still working to put out the fire as of 8:15 a.m.

It was not immediately clear what caused the blaze.