The city fire department is investigating a fire that broke out early Friday morning inside an Upper East Side apartment building.

It broke out around 1:30 a.m. in a building located at 343 East 66th Street.

Fire officials say the flames started in two apartments on the top floor.

The fire was under control within two hours.

Five firefighters have minor injuries.