A man is in the hospital with life-threatening injuries after an early Thursday morning fire at a Manhattan apartment building.

City fire department officials said flames broke out around 12:30 a.m. at a five-story building on Broadway and West 148th Street in Hamilton Heights.

Two people were hurt, with the man with life-threatening injuries being rushed to Harlem Hospital.

He is being treated for smoke inhalation, while the other person refused medical attention.

Neighbors said they acted quickly once they got wind of the fire.

"People were banging on the doors, and the hallways were full of smoke," one neighbor said. "Everyone was coming down, and we got outside, there was an individual on the floor that was taken out of the law firm.

"And we were out here from like 1 o'clock in the morning to almost 2:30 in the morning. And then we were allowed back in."

The cause of the fire is not yet known.