The city fire department is investigating the cause of a three-alarm fire that tore through several floors of a Manhattan apartment building Thursday morning.

FDNY officials say it broke out around 6 a.m. inside a five-story walkup located at 1830 Second Avenue on the Upper East Side.

Four minor injuries were reported, including two firefighters.

All were treated at local hospitals.

FDNY officials say it appears the fire began in the basement and rose up through the walls, heavily damaging four floors of apartments.

The building also houses a ground floor restaurant that was under construction.

Second Avenue was closed to traffic between 93rd and 96th streets but has since reopened.