The state has abandoned its 3-year-old court battle against some new car dealers who charged their customers millions of dollars in "document fees" or "market adjustment fees" that were routinely added to the cost of vehicles, an official with the Maryland attorney general's office said yesterday.

The state withdrew its appeal last week of a Harford County Circuit Court ruling in June that such fees did not violate the state's Retail Installment Sales Act.

But Evelyn O. Cannon, chief of litigation for the attorney general's office, said that the state may use its Consumer Protection Act to halt dealers from engaging in the practice in the future.

The court action was centered around a legal opinion by Attorney General J. Joseph Curran Jr. in 1988 that concluded that such fees were illegal when applied to the purchase of cars for which dealers arranged the financing. The dealers challenged Mr. Curran's opinion, and Judge Cypert O. Whitfill ruled in June in their favor. The judge noted, however, that the practice could be in violation of other laws.

The fees ranged from $25 to, in at least one case, $1,295, according to records at the attorney general's office. Ms. Cannon said that the average charge was $150.

The office estimated that "tens of thousands" of car buyers paid a total of $4 million to $4.5 million extra in these fees between August 1986 and August 1988.

Ms. Cannon said that the principal reason for withdrawing the appeal was that the state felt it had broader power to take action against dealers under the Consumer Protection Act than the Retail Installment Sales Act.

During the summer of 1990, 158 of the 211 dealerships that the state had targeted reached a settlement with the attorney general's office and agreed to make refunds that totaled about $5 million. Most of the refunds took the form of credits that customers could use for repairs, service and the purchase of parts.

Peter V. Berns, deputy chief of the Consumer Protection Division, said that his office has no plans to take action against the 53 dealers not involved in the settlement. He said that the division's "greater concern is the future conduct" of car dealers.

He noted that the dealers agreed to stop charging the fees in 1988 when the state took legal action.