After emigrating from the Dominican Republic in 1980 and working long hours in New York as a construction worker, Ramón Ortiz found a sense of stability in a five-bedroom apartment in the Hamilton Heights neighborhood of Upper Manhattan.

It was spacious enough to house his wife, daughter and three grandchildren. The rent was a bargain when he moved in and still was: $1,387 a month. There was also a sense of community in the six-story building as the majority of tenants were from the Dominican Republic.

“It was perfect,” Mr. Ortiz, 66, said in Spanish in an interview on Saturday.

That was all thrown into chaos on Friday afternoon when a colossal fire raged across the brownstone building at 565 West 144th Street, near Broadway, obliterating its top two floors.

A tenant and a police officer were treated for smoke inhalation, and seven firefighters had minor injuries, James Leonard, the chief of the Fire Department, said at a news conference. The cause of the fire remained under investigation.