The American Civil Liberties Union argued yesterday that the judge's exclusion of Nation of Islam leader Louis Farrakhan and Bishop George Augustus Stallings Jr. from the Barry trial was based solely on the controversial views the two men hold, reasons that should not bear on a citizen's right to attend a public trial.

Other cases in which spectators have been barred involved "good cause," and "stand in stark contrast to the arbitrary and unfounded" exclusions of Farrakhan and Stallings, the ACLU argued in legal papers filed with the U.S. Court of Appeals here.

Lawyers for U.S. District Judge Thomas Penfield Jackson had argued that he rightfully excluded the two men because their presence in the courtroom would likely send a message of intimidation and racial animosity to jurors and witnesses.

The highly unusual controversy erupted last week when Jackson barred the two black religious leaders from the drug and perjury trial of D.C. Mayor Marion Barry. The local chapter of the ACLU challenged the ruling on Monday, spawning a three-day exchange of legal arguments that ended with the ACLU's final legal brief yesterday. The U.S. Court of Appeals has placed the case on a fast track, and could rule at any time.

In the days since his ruling, Jackson has drawn fire outside the courthouse as well, with Barry supporters and others accusing him of going too far.

Two organizations representing black lawyers called the exclusion order "unconstitutional and highly outrageous," and one, the National Bar Association, joined the ACLU by filing a friend of the court brief seeking its reversal.

"Such an arbitrary and capricious order excluding members of the public who happen to be African-American leaders constitutes an abuse of judicial discretion and smacks of racism," a spokesman for the National Conference of Black Lawyers and the National Bar Association said.

Last Thursday, when Farrakhan attempted to attend the trial using a spectator pass provided by the defense, he was turned away. When Barry's lawyer, R. Kenneth Mundy, inquired about the action in open court, Jackson said Farrakhan's presence "would be potentially disruptive, very likely intimidating," and that he would be barred for the rest of the trial.

A similar scene happened Friday, when Stallings tried to attend.

Farrakhan, leader of the 10,000-member Nation of Islam, has been the focal point of racial and political controversy for years. Stallings, a Roman Catholic priest for 15 years, broke from the Washington Archdiocese a year ago, calling it hopelessly racist.

On Monday, Arthur B. Spitzer, of the ACLU's local chapter, challenged the order on behalf of Farrakhan, Stallings and Barry. Spitzer argued that the exclusion unconstitutionally deprived Farrakhan and Stallings of their rights without giving them an opportunity to fight that deprivation at a hearing. He also alleged that the ruling deprived Barry of his right to a fair and open trial.

On Tuesday, lawyers for Judge Jackson defended his actions in a brief, arguing that Farrakhan's and Stallings's presence would send a silent and "impermissible message" to jurors and witnesses because of the "widely known and highly controversial views" of the two men.

The lawyers cited news reports of the two men's statements, in which both have said that Barry's drug arrest was racially motivated. The lawyers argued that Farrakhan "has been widely quoted as advocating the view that drug abuse is a problem inflicted on black Americans by a white American conspiracy."

The lawyers said that Jackson's reasoning was strengthened in light of the mayor's "publicly avowed strategies of seeking a hung jury and jury nullification," the legal term for a jury's refusal to convict no matter how strong the evidence.

Yesterday, Spitzer attempted to buttress his challenge by focusing on the same public statements Jackson's lawyers sought to highlight.

Spitzer argued that the contentions that Barry's arrest was racially motivated "are hardly unique in this community, and surely do not disqualify those who hold them from attending the trial."

The judge's attempt to explain his action "only demonstrate" its "impropriety," Spitzer asserted.

Jackson's chief lawyer, John D. Aldock, who argued in his brief that judges have wide discretion to protect order, added yesterday that Jackson is "doing his best to run a fair and orderly trial under the most difficult circumstances."

Both sides also have argued over a key procedural question. Aldock said that Farrakhan and Stallings should have sought a formal ruling from Jackson before going to the appeals court, and thus their appeal should be dismissed. Spitzer countered that Jackson made clear in his statements from the bench that his rulings were final and that any further consideration of the matter should go to the appeals court.