The city agreed to bring its system of underground fuel storage tanks at Sanitation, Police, Fire Department and other locations into compliance with federal environmental standards in a Jan. 25 settlement of a civil suit filed by the U.S. Environmental Protection Agency.

In addition to paying $1.3 million in penalties, the city agreed in a consent decree to a program of improving its ability to detect leaks and to upgrading its 1,600 tanks at 400 locations in the five boroughs.

The lawsuit specifically names 51 locations that have violated the Federal Resource Conservation and Recovery Act and related E.P.A. rules on underground tank storage since 1997.

Among the sites requiring remediation are Department of Sanitation locations on the Gansevoort Peninsula and on West St. between Canal and Spring Sts. But all municipal underground tanks are subject to the provisions, including those at fire stations and police precincts.

An E.P.A. spokesperson said the city voluntarily told the E.P.A. that it would not be able to meet a 1998 deadline for compliance with the law and the suit was filed in 2002.

A spokesperson for the city said on Jan. 31 that the city worked with the E.P.A. and is working to upgrade or replace about 80 noncomplying tanks up to the federal standard.

Although it is not required under federal law, the city will install a state-of-the-art monitoring system at a central location to detect leaks in Police, Fire and Transportation Department storage tanks, the city said.

The lawsuit was separate from the issues surrounding 60 Hudson St., a privately-owned Tribeca building in which the city Buildings Department issued a waiver (now before the city Board of Standards and Appeals) to allow the owners to store diesel fuel above the legal limits as long as they implement added fire protections.