Washington area governments, faced with the possible loss of up to $250 million in federal funds, have tentatively agreed on a sweeping plan to expand the Blue Plains regional sewage treatment plant and dispose of the mountains of sludge that it will generate.

The agreement, which would increase capacity of the plant -- already one of the largest in the world -- by about 20 percent, sets the costs and determines how jurisdictions would divide use of the plant through the year 2010. It also would effectively supercede all previous accords on the facility, which has been the focus of sometimes-bitter disputes known as "sewer wars" between the District of Columbia and its suburban neighbors for about a quarter century.

"It will guarantee . . . a dramatic improvement" in dealings over sewage problems," said Fairfax County Executive J. Hamilton Lambert, who was chairman of a committee of chief administrators from Fairfax, Prince George's and Montgomery counties and the District on the Blue Plains facility.

The total cost of expanding the Blue Plains plant, which is in Southwest Washington on the Potomac River, is estimated at more than $300 million. Of that sum, local officials are hoping that the federal Environmental Protection Agency will provide as much as $250 million under the Clean Water Act. The project would take about six years, officials said.

Top officials from Washington-area governments tentatively approved the plan last month after the EPA warned that federal funds earmarked for the expansion could be lost unless an accord were reached by Aug. 26, according to Lambert. The agreement will be released publicly today.

The Fairfax County Board of Supervisors is scheduled to consider the plan at its meeting Monday. The agreement must also be approved by D.C. Mayor Marion Barry and the Prince George's and Montgomery county councils.

D.C. officials said yesterday that a key provision of the agreement -- permitting the District to "buy back" sewage treatment capacity from the suburbs if its growth warrants such a move after the year 2000 -- would insure unimpeded development in the city. The District treats all its sewage and waste water at Blue Plains, which currently treats about 287 million gallons of waste each day. Its capacity is 309 million gallons a day and would be expanded to 370 million gallons.

"The real heart of this," said D.C. City Administrator Thomas Downs, "is that we don't have to worry about sewer moratoriums or arbitrary restrictions on growth for the next 25 years."

Moreover, the accord seems to offer a long-range solution to the disposal of about 2,000 tons of sludge generated daily at Blue Plains. That problem became a crisis in the fall of 1983, when nearly 200,000 tons of chemically treated sludge accumulated at Blue Plains before suburban jurisdictions finally agreed to get rid of most of it.

Under the agreement, the District and suburban governments would pay part of the cost of building an incinerator at Blue Plains, which would be mostly financed by the federal government. The plan calls for burning about 1,000 tons of sludge daily and for building new dewatering and composting facilities for the sludge.

Additional facilities to treat, burn or dispose of the sludge would make up about $135 million of the total project. An additional $72 million would pay for faciltiies and equipment to ensure water quality.

The suburban governments, seeking to avoid building expensive new treatment plants or expanding existing ones inside their own borders, wanted additional treatment capacity at Blue Plains as quickly as possible. The suburbs would get more than half the 61 million gallons per day in additional capacity scheduled for Blue Plains.

The District had several essential interests. First, it wanted assurances that it would have an outlet for sludge produced at the plant, and that it would never again face accumulated mountains of sludge, as it did in 1983, when it was forced to rely on the suburbs to absorb the treated refuse.

District officials also insisted on a kind of safety valve in their negotiations with the suburbs: a provision that if its production of waste water grew faster than projections, it could buy sewage treatment capacity back from the suburbs. In such a case, the city would be required to give the suburbs 10 years' notice -- enough time for them to build new facilities.

The suburbs also agreed to pay the District a $1.5 million annual user's fee for Blue Plains.