A massive fire roared through an Upper East Side apartment bullding early Thursday morning, leaving one man dead and 13 people injured, though firefighters were able to save one resident in a daring rescue. 

The blaze began around 3:20 a.m. on the first floor of a five-story apartment building at 324 E. 93rd Street.

Firefighters discovered one man dead in a third-floor apartment.

Eight firefighters and four residents suffered minor injures.

A man screaming for help from a window was be firefighters on the roof of the building, the FDNY said. 

“The gentleman on the fifth floor was trapped with fire coming up the stairs and fire blocking the fire escape, and his two options were really to jump or to burn, and a firefighter was lowered from the roof in very dangerous fire and heat conditions," Fire Commissioner Daniel Nigro said. "That was the only way in which this man could have been saved.”

Jessica DeMorris, 26, and Rocco Clauss, 24, were sleeping when they say a fire broke out in the living room of the ground-floor apartment where they have been staying.

"I ran through the living room with both dogs in my arms completely engulfed by flames," Clauss told NY1 News.

Clauss and DeMorris say they had been housesitting and dog sitting for friends.

The fire commissioner said the fire spread quickly, in part because the couple left the door open when they fled.

More than 250 firefighters and rescue workers from units across the city responded to the alarm.

The century-old building is a “complete loss” and two neighboring buildings were damaged, fire officials said.