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. 

A massive blaze engulfed a six-story rental building on West 107th Street near Amsterdam Avenue Tuesday morning, the FDNY said.  FDNY

The fire erupted at 8:20 a.m. on the top floor of the six-story rental building, the FDNY said. Citizen

Intense smoke and flames billowed from the roof of the building.

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. 

The fire quickly escalated to a four-alarm response, officials said. Citizen

There was no immediate word on injuries.