Investigators are trying to figure out what sparked a fire on the top floor of an apartment building on the Upper East Side.

Flames broke out around 1:30 a.m. Friday on East 66th Street near First Avenue.

Fire officials say the blaze started in two apartments on the top floor and took two hours to bring under control.