Fire erupted inside 1594 Second Ave., near East 83rd Street, officials said. View Full Caption DNAinfo/Ben Fractenberg

UPPER EAST SIDE — About 170 firefighters extinguished a blaze that climbed through the walls of an Upper East Side building Wednesday morning, FDNY officials said.

The quick-moving fire started in the basement below Duke's, a restaurant on the first floor of of 1594 Second Ave., near East 83rd Street, about 9:50 a.m., according to officials.

"We had a heavy fire condition in the basement and that fire quickly spread up through the pipe chasers to the first, second, third and fourth floor," said Deputy Assistant Chief Michael Gala.

Katie Snyder, 20, was sleeping when she was awoken by her neighbor banging on the door, she said.

"I wake up and open my bedroom door. Our whole living room is filled [with smoke]. I screamed, 'There's a fire! There's a fire!'" she said.

She and her fiancé raced out of the smoke-filled building to safety on the street.

"We ran out. We could barely breathe," Snyder said.

@ShayeWeaver from about 10mins ago fr my wife pic.twitter.com/oIgf8lLM9K — Andrew Fine (@AFineBlogger) February 8, 2017

Two people who lived in the building refused medical attention at the scene and four firefighters were treated for minor injuries, officials said.

There were 13 people displaced after the blaze, according to the Red Cross, and the organization was working to provide temporary housing and money for basic necessities.

So far, four families were being housed by the Red Cross while other residents found other lodging.

Firefighters brought the blaze under control about 12:20 p.m., the spokesman said. Fire marshals will determine its cause, officials said.

"Our members performed admirably. At the height of the fire, we had six hose lines stretched throughout the building and they did a tremendous job under some trying conditions," Gala said.

The firefighters smashed windows on the top three floors of the building.

Second Avenue was taped off on either side of East 83rd Street.