Shortly after a federal judge last month approved an antitrust settlement deal between the Justice Department and Microsoft Corp., the company's top lawyer approached the California attorney general's office with a special offer, according to several people familiar with the conversations.

If California and other states that had challenged the settlement decided to appeal the judge's ruling, Microsoft would not only fight the appeal, but also would contest how much in legal costs the states were entitled to recover from the long-running litigation.

But if the nine states and the District of Columbia decided against an appeal, Microsoft would cover the states' expenses and provide an additional pot of funds for the states to help enforce the settlement deal, the sources said.

After some deliberations, California -- which had agreed to bear most of the states' legal costs to challenge the agreement -- decided to accept the offer, along with six other states and the District of Columbia. On Nov. 29, they announced that Microsoft would pay them a total of $25 million in legal fees, plus $3.6 million for technical experts and other resources to help ensure that the software giant complies with the settlement's terms.

"It was apparent that Microsoft would be generous and not give us any trouble over fees," said one attorney. "But if any one state did appeal, the generosity wouldn't be as great, and any appealing state would not participate in any fee payment."

Massachusetts and West Virginia decided to press on with the case and will have to seek court costs whenever their appeal is concluded.

But some legal experts, as well as Microsoft's corporate rivals, said the other states gave up an important opportunity to appeal the ruling, arguing that the judge erred in not forcing Microsoft to disgorge the fruits of its illegal practices. They worry that Microsoft was able to use its financial resources to help persuade the states.

"Microsoft makes $25 million in a morning's work," said Edward Black, head of the Computer & Communications Industry Association, a trade group that opposes Microsoft in the case.

The states that took the deal said that it was time to end litigation and focus on enforcing the settlement, which imposed a series of restrictions on Microsoft's business practices after it was found to have illegally protected its monopoly Windows operating system.

"The case exposed the company's illegal practices, and now the world looks differently at Microsoft," Iowa Attorney General Tom Miller announced at the time. "We will be vigilant and hold the company to compliance."

In an interview yesterday, Miller said that the issues of fees was incidental to the states' decision.

"We had already decided to go the enforcement route" rather than appeal, he said. "At that point, we felt they should be willing to deal with fees, and they agreed."

Microsoft spokesman Jim Desler declined to comment on specific company negotiations but said they were a part of the company's efforts to "move past the adversarial role and build a more constructive relationship with state governments."

Microsoft had made similar offers to several states throughout the course of the case.

Williams & Connolly, the Washington, D.C., firm that handled the state's challenge, had determined there were grounds for appeal, according to sources. But the states had received varying legal opinions on the chances for successful appeal, according to one state attorney.

And states everywhere are facing severe budget crises. The costs on continuing litigation, as well as chances for success, should always be factored into any decision on pursuing a case, the attorney said.

In his press release announcing his decision to appeal, West Virginia Attorney General Darrel V. McGraw made veiled reference to the financial issues and the decision of his colleagues to drop the case.

"No reputable government should plead poverty and allow an adjudicated lawbreaker to retain their ill-gotten gains," McGraw said.

Deborah Rhode, a professor of legal ethics at Stanford University, said that such negotiations, while not a "pretty practice," are not unusual in corporate litigation. She added that the U.S. Supreme Court has affirmed the propriety of simultaneous negotiations over fees and legal issues.

The breakdown of the $25 million in legal fees -- including how much each state will receive -- has not been made available by the states, which were still exchanging documents with Microsoft last night.

But state sources confirmed that the fee for Williams & Connolly was about $10.07 million.

The firm had multiple attorneys working intensively on the case from November 2001 through June of this year, with more than a month of trial days.

It is not clear if the firm will handle the appeal for Massachusetts, whose attorneys did not return calls for comment. A Williams & Connolly attorney involved in the case had no comment.

The other $15 million in expenses by the states was incurred over several years of the case and included payments for outside technical and economic experts. States also can bill time for their staff attorneys at private rates.