The Justice Department dropped prosecution of four leading gypsum producers yesterday, agreeing to settle the six-year-old case in exchange for an unspecified back tax payment.

The agreement, which was approved by U.S. District Judge Hubert Teitelbaum in Pittsburgh, came despite a last minute plea by a Washington antitrust attorney representing a former gypsum manufacturer who is largely credited with bringing the government its case.

The attorney, Charles Bangert, was retained by Claude Huckleberry, former president of Texas Gypsum Co. in an effort to call attention to the settlement's terms.

Bangert appeared before Teitelbaum to argue that his client did in fact have standing to question the settlement, despite the fact that the Justice Department said in its dismissal memorandum that there are no remaining private antitrust suits pending in federal courts. Bangert asked Teitelbaum to delay approving the agreement.

When word of the proposed settlement surfaced last week, a number of antitrust experts said the case raised the issue of buying justice and suggested that other firms might try to exchange back tax payments for dismissal of similar criminal charges. In an interview yesterday, Bangert said he would consider whether Huckleberry could appeal the decision, file his own suit, or perhaps take his case to members of Congress.

Huckleberry, if he chooses to file suit, would have to prove most of the complex case without benefit of the government's evidence. Had the companies been convicted, Huckleberry could have used the government's evidence.

But the government decided not to bring a second trial, noting the expense of the lengthy litigation and the possibility that the government would collect nothing if the firms were acquitted.

The Justice Department's antitrust division agreed to settle the case in exchange for a payment by the defendants of 35 percent of the total additional income tax liability the firms would face if they were convicted.

The Internal Revenue Service said the settlement "will result in a collective increase in defendants' taxable income of approximately $12.3 million," the agreement said, noting that the money would also be subject to taxation at the corporate income tax rate of 48 percent. Ultimately, the companies maintain their payments could amount to $6 million.

In its settlement papers, the Justice Department said the deal "fully accords with the public interest." Furthermore, the government said it is doubtful that there would be an additional deterrent effect resulting from a retrial.

The government also pointed out that since that case was brought, price fixing has been made a felony. When the gypsum case began, price-fixing offenses were misdemeanors and the maximum penalty in this case would have been a $50,000 fine.

The government also that even if the companies were convicted the Irs would not necessarily receive any additional taxes, in light of complaints about the tax liability raised previously by the gypsum firms' attorneys.