City fire department officials said two people, including a firefighter, were seriously hurt Sunday afternoon after an unattended candle sparked a fire in an apartment building in Upper Manhattan.

"We opened up the door to the front and we saw the smoke just started to hurl in," said a resident describing being overcome with black smoke before having to run down a fire escape. "We were like, 'Ok, time to get out!'"

It happened around 12:05 p.m. on West 163rd St. near Broadway in Washington Heights.

Flames broke out in apartment on the building's second floor of the building, but firefighters searched the entire building and were able to contain the blaze to the apartment, officials said.

Officials said the fire was accidental, and that the person in the apartment fled, leaving the door open. That allowed wind to fan the flames and spread smoke.

"It's terrifying. This has never happened. Ever," said a resident of the building. "We're happy we got out."

The blaze was under control shortly before 1:10 p.m. thanks to the help of 65 members of the FDNY, according to officials.

Officials said one person was taken to a local hospital in serious condition.

Two firefighters were taken to another hospital, one in serious but stable condition while the other had minor injuries, the FDNY said.

The Red Cross said 18 units in the building were affected and provided immediate housing for two families.

A door left open during a fire was a contributing factor to a fire in December that claimed 13 lives in another building.

Officials determined that the fire on Dec. 28 spread throughout the Bronx building because the tenants fled the apartment where the fire started without closing the door behind them.

Authorities said that fire in the Belmont section of the Bronx was caused after a little boy played with the burners on the stove.

Officials warn tenants to shut their doors when they flee a fire, to help contain the flames within the apartment.