Neither President Trump nor his family was in the building, a Fifth Avenue skyscraper that is the calling card of his real estate business.

The commissioner said firefighters went with the Secret Service to inspect the president’s residence. While the rest of the building had a “considerable amount of smoke,” it was not immediately clear if it reached Mr. Trump’s unit, he said.

More than 200 firefighters responded to the fire, the cause of which was unknown, the commissioner said.

Mr. Trump, who was in Washington at the time, said on Twitter that the tower’s construction helped confine the fire.