MTA officials said Wednesday night that the transit agency plans to take the city to court over a fire under an elevated Metro-North track earlier this year.

Back in May, flames broke out underneath a critical stretch of the Park Avenue Viaduct in East Harlem.

The fire caused significant structural damage and delayed Metro-North service for several days.

Investigators determined the flames were sparked when fuel spilled onto a hot generator at Urban Garden Center, which leased space underneath the tracks from the city's Economic Development Corporation.

Now the MTA has filed a notice of claim, saying the city showed "carelessness, recklessness and negligence" in allowing the storage of flammable and explosive material there.

City Hall officials say they will review the notice, while a spokesperson for the de Blasio administration says it has taken to steps to prevent similar fires.

A city spokesperson said the city, "took swift and decisive action in the wake of the fire to set up an inspection regimen that continues to review these areas citywide for violations and fire hazards. By and large, spaces under train tracks and viaducts are unoccupied by businesses or structures."