Three people were injured in an early-morning fire at the top of Trump Tower in midtown Manhattan, the New York Fire Department said on Monday, as the city's workday rush began.

U.S. President Donald Trump was in Washington at the time. Trump's primary residence was in the building before his election victory and inauguration nearly a year ago.

One firefighter was hospitalized with nonlife-threatening injuries, while two people received minor injuries that were treated at the scene, including a building worker whose injury was initially described as serious, the Fire Department said.

Eric Trump, one of the president's sons, said on Twitter that it was a small electrical fire in the cooling tower on the building's roof.

"The New York Fire Department was here within minutes and did an incredible job," said the younger Trump. "The men and women of the #FDNY are true heros and deserve our most sincere thanks and praise!"

Eric Trump tweet

The Fire Department said the fire was not inside the building, but on top of it.

"We had flames coming out of the vents. No smoke condition or fire was on the inside," Manhattan Borough Commander Assistant Chief Roger Sakowich said on Twitter.

The cause of the blaze is being investigated by the city fire marshal, a department spokesman said.