D trains are bypassing 18th Avenue in both directions.
The initial call came in at about 7 a.m. at the building on New Utrecht Avenue in Bensonhurst.
It took firefighters over two hours to bring the fire under control. There were no injuries.
The building sits directly under the elevated train line.

(Photo courtesy Carolyn Quinn via Twitter)
The MTA says b/d D trains are running on the N line from Stillwell Ave to 36 Street, due to the FDNY activity at 18th Avenue. Allow additional travel time.
Here is video of the scene from 18th Avenue:
#nyfd #fire at 18th ave & 85th no d train now #brooklyn #bensonhurst pic.twitter.com/2w7r9PVo3j
— Kelly Stuart (@kellystuart) December 6, 2015
Video courtesy Kelly Stuart via Twitter
Transit officials say inspectors from the Department of Buildings are still assessing the damage.