A massive fire engulfed a Chelsea building early Tuesday, shutting down several streets, sending the smell of smoke as far as Queens and prompting fears the building may collapse.

The five-alarm fire broke out around 3 a.m. on the fourth floor of 221 W. 17th St. and ripped into the fifth and sixth floors, tearing through the roof, the FDNY said.

The FDNY tweeted that the fire was under control just after 7 a.m., but also said the building, which is near Seventh Avenue, was in danger of collapsing.

"The building is in major danger of collapse, so we are keeping everybody away from the building," an FDNY chief said. "We have a few other buildings that are evacuated because of the potential collapse, and this is going to be an extended operation."

A "collapse perimeter" has been set up around the building and across the street, the FDNY said. People who work next to the building are not allowed to go into their offices.

Neighbor Joshua Bares said he came around the corner because he smelled smoke and saw flames shooting "everywhere."

The apartment building across the street was evacuated as smoke permeated the neighborhood.

“I saw a black cloud and then five minutes later I saw all these flames coming up from the bottom to the top,” said Alan Jennings, who lives across the street. “It wasn’t good to inhale some of that stuff.”

Nearby restaurant Cafeteria opened its doors to evacuees so they could stay warm.

Many people said they were concerned that Walker Tower, a classic art deco building in the neighborhood, was compromised by the fire. It is unclear if the fire affected that building, which was once the corporate headquarters of Verizon.

The 10-story building was under construction and slated to house a luxury, 14-unit apartment building called the Dorian, according to TheRealDeal.com.

Contractors had filed applications for installing a sprinkler and standpipe system back in August, but the application was still under review, records from the NYC Department of Buildings show. Sprinklers weren't installed in the building when the fire broke out.

One lane on Seventh Avenue had reopened by 5 a.m. after the street was closed from West 23rd Street to the teens as firefighters worked to put out the flames. Some side streets were also temporarily closed between Seventh and Ninth Avenues.

It wasn’t clear what sparked the blaze. No injuries were reported.

[NATL] Top News Photos: Pope Visits Japan, and More