Justice Department officials made "undue and improper attempts" to drive a small Washington computer software company out of business, a federal bankruptcy judge ruled yesterday.

Judge George F. Bason Jr. ruled that the head of the federal bankruptcy trustee program, in an attempt to "curry favor" with other Justice officials, had attempted two years ago to force Inslaw Inc. to liquidate under bankruptcy law, and then took retaliatory action against the bankruptcy trustee for the Washington area when he refused to carry out the plan.

"Inslaw has proved its case by compelling, clear and convincing evidence," Bason said. He accused Justice Department officials of being engaged in "machinations that were going on behind the scenes."

The judge said he could have held the Justice Department in contempt for interfering with Inslaw while it was under bankruptcy protection, but instead chose to decide the case under bankruptcy law.

He also said the former U.S. bankruptcy trustee for the Washington area and a federal bankruptcy judge in New York gave incorrect testimony in the case, but he declined to accuse them of perjury.

The ruling was a major victory for Inslaw, a maker of software used by prosecutors to track cases through the courts. Inslaw, whose largest customer was the Justice Department until it became embroiled in a contract dispute with the department four years ago, has charged that it was driven into bankruptcy and then harassed because of a "vendetta" carried out by Justice officials, one of whom had been fired by the company.

Bason ordered that Justice Department officials be prohibited from anything but routine contact with the bankruptcy trustee's office in Alexandria regarding the case, ordered the government to pay the company's legal fees and $1,000 in compensatory damages, and said he would rule later on possible punitive damages.

Bason also said he would ask the attorney general to appoint an outside official to give the Justice Department "independent advice" on settling the complicated Inslaw bankruptcy case.

The Justice Department said it would appeal the ruling. "We believe the court's ruling was based on inferences from evidence which does not support any inferences of wrongdoing," Justice Department attorney Dean S. Cooper said. "We intend to pursue our appellate remedies." A Justice Department spokeswoman said neither the department nor the officials involved would have any additional comment.

William Hamilton, Inslaw's founder and president, said he was pleased by the ruling. "I think it makes our complaints acquire some credibility," Hamilton said. "I just hope it will lead to a more constructive attitude toward repairing what happened."

Bason said he believed Inslaw's contention that shortly after the company filed for bankruptcy, in February 1985, Thomas Stanton, director of the executive office of bankruptcy trustees at the Justice Department, unsuccessfully attempted to force then-U.S. Bankruptcy Trustee William C. White to convert Inslaw's case from Chapter 11 of the federal bankruptcy code -- which allows a corporate reorganization -- into one under Chapter 7, under which a company is liquidated.

Stanton denied the charges, but Bason said, "I found Mr. Stanton's testimony in crucial respects to be evasive and unbelievable. . . . The court simply finds that testimony to be utterly incredible and unworthy of belief."

Bason ruled that Stanton, in an attempt to "curry favor" with higher Justice Department officials at a time when the bankruptcy trustee program was being evaluated, agreed to convert the case to Chapter 7 following a conversation with C. Madison Brewer, an official in the executive office of U.S. attorneys in the Justice Department, which had been Inslaw's biggest customer. Brewer was fired by Inslaw in 1976, and the company has charged that he continually interfered in Inslaw's Justice Department contract. That case has yet to be heard.

Bason said evidence in the current case "leads this court to infer that in this conversation . . . Mr. Stanton made a commitment to Mr. Brewer that he was going to do everything he could to put Inslaw out of business within 30 to 60 days."

However, White allegedly refused Stanton's request to convert the case. Bason said there was "clear and convincing evidence" that Stanton had retaliated against White by refusing to provide White with additional staff despite a fast-growing case load in the Alexandria bankruptcy trustee's office.

White has denied that Stanton pressured him, but Bason concluded that White may have incorrectly remembered the events. "People do have a capacity to forget things when it is painful for them to remember -- or maybe even inconvenient for them to remember," the judge said.

"I do not believe Mr. White has deliberately testified falsely in this case," Bason said, but rather, he added, "Mr. White is blessed with a memory that blanked out some items that did occur."

White, the longtime bankruptcy trustee in Alexandria for the Washington area, recently went into private practice in bankruptcy law in Virginia, and Bason suggested that White was afraid of antagonizing the trustee's office with which he now is dealing on behalf of clients. White could not be reached for comment yesterday.

Bason also rejected a March 26 affidavit by Bankruptcy Judge Cornelius Blackshear recanting much of the testimony Blackshear had given the day before in a deposition in the case. Blackshear had testified that he was aware of Stanton's efforts to convert the Inslaw case to Chapter 7, and that after White had failed to agree, Stanton had asked Blackshear, then a bankruptcy trustee, to send his chief deputy to Washington to convert the case.

In his affidavit, Blackshear said he had confused Inslaw with another case. But Bason, while saying "I have no reason to doubt {Blackshear's} integrity or veracity," chose to believe the earlier testimony. He also noted that Blackshear had changed his testimony after two phone conversations with White.

"The inference is rather strong that Mr. White was trying to persuade Judge Blackshear that Mr. White's recollection was correct and Judge Blackshear's recollection was incorrect," Bason ruled. "I believe that Judge Blackshear's original testimony is accurate and his recanted testimony is inaccurate."

Bason called Blackshear's recantation "the result of an honest mistake on his part."

The testimony Bason chose to believe in deciding the case included notes of separate phone conversations a Justice Department official and an Inslaw employe had shortly after the bankruptcy filing with Jack Ruhe, an assistant to Brewer. Ruhe said in the conversations that he expected the Inslaw case to be converted to Chapter 7, and indicated that he was basing that on information that Brewer had gotten from Stanton.

In testimony during the case, Ruhe denied that, saying he was predicting the conversion based on his experience with a bankruptcy case several years before. But Bason ruled that Ruhe's testimony was "simply incredible," and added, "Mr. Ruhe was repeating . . . information that he had gotten from Mr. Brewer, who had talked to Mr. Stanton."

And Bason compared Ruhe's testimony to that of Assistant Secretary of State Elliott Abrams in the congressional Iran-contra hearings: "I'd have to say Mr. Ruhe was the Elliott Abrams of this bankruptcy court, because even though Mr. Ruhe kept his demeanor throughout, his testimony was unbelievable."