MIAMI (AP) _ The state of Florida and the federal government said today they have settled a 2 1/2 -year-old lawsuit over the cleanup of the imperiled Everglades, but the agreement left grumbling on both sides of the bitter fight.

Neither environmentalists nor farmers were happy over the prospect of the settlement.

Gov. Lawton Chiles and U.S. Attorney General Dick Thornburgh appeared together in West Palm Beach to discuss the agreement that could put aside differences and unite federal and state governments in cleaning up the fragile ecosystem.

''Today marks a new day for the Everglades,'' said Thornburgh.

The settlement will be presented to federal Judge William Hoeveler after the state spent more than $6 million in legal fees.

Thornburgh said he was asked by Chiles to become involved personally to settle the lawsuit filed by U.S. Attorney Dexter Lehtinen.

''As far as I'm concerned, it has all the elements we've always sought,'' said Lehtinen.

Chiles said the negotiators werwe able to move past assigning blame and move forward with a plan to stop agricultural runoff into the vast wetlands.

''We've always said we're going to say not who was responsible first, but what steps we can take to save the park,'' Chiles said. ''We're not going to be spending millions of dollars litigating this.''

Negotiations in the 2 1/2 -year-old lawsuit reached a milestone early this year when Chiles conceded pollution had been allowed to seep into the Everglades despite state and federal water quality control laws.

The Everglades in southern Florida are about 100 miles long and 50 to 75 miles wide. Everglades National Park covers 2,000 square miles within that area.

The lawsuit accused the state of breaking its own laws by sending polluted water into Everglades National Park on Florida's southern tip and into Loxahatchee National Wildlife Refuge in Palm Beach County, at the northeast edge of the Everglades region.

The suit sought to force the state to stop the runoff from reaching national park land.

Some scientists say water carrying fertilizers out of sugar cane and vegetable farms has damaged marshes in the low-nutrient Everglades and has hurt endangered wildlife there.

The legal dispute retreated behind closed doors in February when the Justice Department and state attorneys decided that would improve chances for an agreement.

Andy Rackley, general manager of the Florida Sugar Cane League, without knowing details of the agreement, predicted farmers wouldn't be happy with it.

''If I were going to speculate, I would speculate it's probably something we're not going to like,'' Rackley said.

Farmers refuse to take full blame for the pollution.

''The feds say that the Everglades National Park has been destroyed because of polluted water from the agricultural area, yet they won't bring forward and show us the facts that the park is in trouble for something we're doing,'' he said.

Environmentalists are concerned about the 80 percent of the Everglades outside federal jurisdiction.

The lawsuit ''has taken on an aura of being the item that will fix the Everglades, and it can't be,'' said Joe Podgor of the Friends of the Everglades.

He said the natural rainfall draining system has been drastically disrupted since the turn of the century, locked by roads and altered by canals and dikes. A settlement would be meaningless if that problem is not solved, Podgor said.

State cleanup legislation that could cost up to $400 million was signed in May. It authorized the creation of taxing districts for farms. It also approved expanding state property seizure powers to create a giant pollution filter. The ''kidney'' would draw out nutrients before the fertilizer-laden water reaches federal land.

Florida taxpayers spent nearly $6 million in legal fees defending the suit against the state Department of Environmental Regulation and the water management district by the time negotiators got together.