Metro officials have agreed in U.S. District Court to clean up oil leaking from its storage tanks in Northwest Washington into the Little Falls Branch in Somerset and to pay the town $10,000 for projects to restore the stream.

The action apparently ends a lawsuit filed against Metro in March by the town, civic organizations and the Mazza Gallerie shopping mall at Wisconsin and Western avenues NW. The suit was believed to be the first community-sponsored suit against a Washington-area government agency under federal environmental law.

That suit also prompted transit officials for the first time to begin costly, system-wide examinations of Metro's underground fuel storage tanks and garage drainage.

Metro lawyers admitted earlier this year that diesel oil leaking from underground tanks at Metro's Western Avenue garage, Jenifer and 44th streets NW, had saturated the ground around the area, seeping into the parking garage at nearby Mazza Gallerie and the Red Line subway tunnel one block away. Tunnel drains carried the oil into sewers leading to the stream.

Somerset residents and officials have negotiated with Metro concerning the pollution for more than a year, Somerset Mayor A. Eugene Miller said. "But no one really did anything to stop the pollution until we sued" in March, he said.

Special filtering tanks installed last April did not adequately remove oil and construction sediment from the subway tunnel's drain water channeling into the creek, residents charged in court.

Metro officials agreed last week to a court-supervised cleanup of silt and oil in the stream. They also agreed to prevent further seepage of oil into Mazza Gallerie's parking garage and to pay Mazza for expenses and damages from the oil.

Metro also will pay for attorneys hired by Somerset and the citizens' group, Citizens' Coordinating Committee on Friendship Heights.

The oil leak may cost Metro up to $1 million in changes to the garage and recovery of the oil, Metro spokesmen said. That does not include the cost of cleaning the creek, lost fuel, damage to Mazza's garage, containment of underground oil, attorneys fees or replacing new fuel tanks at the bus garage, they said.

Metro has pumped 25,000 gallons of fuel out of the saturated ground, spokeman Al Long said.

"The aim is not to pollute the stream, and this is a good settlement," said Frank Filiatreau, a Metro attorney who handled the suit. "Metro has gotten behind and done something about it. Once we get that oil out of the ground, the case will be solved."