The names of the dead worker and the injured hardhat were not immediately released.

About 65 firefighters and 12 fire trucks rushed to the building, which contained scaffolding and netting.

The five-story building at 27 W. 38th St. also was being demolished.

“All I heard were people screaming and yelling. The two top floors collapsed and people are still trapped,” said a man who was working on the building next door at the time of the collapse.

“The ceiling caved in on the two top floors,” said the man, who did not want to give his name. “The guy in charge was screaming for everyone to get out.”

The building is the future site of the 27-story Aloft New York Midtown Hotel.

A complaint about excessive debris at the site was made on Aug. 25, sources said.

A source close to the investigation told The Post that construction debris was overloading a floor and caused the collapse.

“They (workers) were working on the fourth floor. They were taking the bricks down and stacking them on the floor. There is only so much (weight) the floor can take,” the source said.

A woman who answered the phone at Fortuna Realty Group, which owns the building, declined to comment other than saying Northeast Service Interiors holds the permit for the work at the site.

A woman who answered the phone at Northeast, of Maspeth, Queens, said the owners were at the site and unavailable for comment.

Metro Industrial Wrecking, a Long Island-based company that got a permit for full demolition in May, pulled out of the project recently after a dispute over money, Robert Bankston of Metro told The Post.

Fortuna said on its Web site that it acquired the building, between Fifth and Sixth avenues, in December 2012 and is planning the 27-story, 72,000-square-foot, 170-room boutique hotel.

Permits also were issued for work on electrical and sprinkler systems in the building.

Shane Nickens, 27, who was working in a building across the street, said he heard a loud crash.

“It sounded like a lot of scaffolding crashing together,” he said. “It was quick like a second. After that you heard a lot of sirens.”