A massive blaze engulfed an Upper West Side apartment building Tuesday morning — as raging flames and plumes of smoke poured from the roof and out of windows.

The fire erupted at 8:20 a.m. on the top floor of the six-story rental building on West 107th Street near Amsterdam Avenue, the FDNY said.

Within about 15 minutes, it grew to a third-alarm fire, before escalating to a four-alarm inferno by 9:10 a.m., according to fire officials.

A total of 40 FDNY units, including 140 fire and EMS personnel are working the scene and operations are ongoing, the department said.

A photo posted on X by the department shows the bright-orange flames and thick smoke escaping from the top floor windows and the roof.

There was no immediate word on injuries.

See Full Page