Firefighters battled for 45 minutes yesterday to control a smoky blaze that erupted in a 12-story building on the Upper West Side.

Thick black smoke poured from a window after the fire broke out at 10:56 a.m. in an 11th-floor apartment at 504 W.110th St.

An FDNY spokesman said the blaze was confined to the apartment, but the heavy smoke damaged the apartment directly above.

One firefighter suffered minor injuries and was treated at St. Luke’s Hospital and released. No residents of the building were hurt.

The cause of the blaze was under investigation, but the spokesman said the fire was not considered suspicious.

Melanie Aronson, 22, a Barnard College senior who lives across the street, said she was awakened by firetrucks’ horns and sirens – and people screaming.

She ran to a window and saw flames and smoke pouring out of the 11th-floor window.

“It was pretty terrifying,” Aronson said. She had to close her windows because the smell of the smoke was so intense. In all, 78 firefighters from 22 units battled the blaze, which was declared under control at 11:40 a.m.