A two-alarm fire swept through a Brooklyn building early Wednesday, killing one and injuring more than a dozen more.

The blaze broke out in the top two floors of a three-story building just before 12:30 p.m. on Flatbush Avenue in Flatbush , an FDNY spokesman said. A 24-year-old man suffering from smoke inhalation was taken to New York Community Hospital, but he was later pronounced dead, police said.

Another 16 people were injured, including 7 seriously, the FDNY spokesman said.

It took more than 100 firefighters and more than an hour to get the flames under control, the spokesman said.

The top two floors were apartments with the first floor designated to a storefront church, police said.

The cause of the fire was not immediately clear, but it appeared to start somewhere on the second floor, the spokesman said. It was not clear where the 24-year-old man was at the time.