One day after D.C. Mayor Marion Barry invited himself to join Minister Louis Farrakhan on stage at the Washington Convention Center, the Nation of Islam leader attempted to return the favor yesterday by trying to attend Barry's trial on drug and perjury charges.

U.S. District Judge Thomas Penfield Jackson, however, barred Farrakhan from the courtroom for the duration of the trial, saying the religious leader's presence would be "potentially disruptive" and "very likely intimidating."

"He is persona non grata for the trial of this case," Jackson said.

Farrakhan told reporters later that Jackson's order "is part of the double standard that black people have been under since we have been in this country." He accused authorities of "wickedness" and hypocrisy in going to great lengths to snare Barry.

"If Bush had people surveilling him for the years that they were in surveillance of the mayor, I wonder what skeletons would pop out of his closet," Farrakhan said.

After years of strained relations, Farrakhan and Barry have reached a highly visible political rapprochement just as federal prosecutors have unleashed devastating testimony and evidence against the mayor, including yesterday's release of the the videotape of the FBI sting.

During a rally Wednesday night at the Convention Center, Farrakhan called Barry -- who appeared on stage with his wife, Effi -- a "repentant soul" and urged Barry to reverse his decision and run for another term.

Barry again was on stage during a second rally last night with his wife and his son, Christopher.

The Muslims' overtures to Barry come at a time when the Nation of Islam has fielded three candidates for elective office in the District and Maryland.

The Muslims, seeking to broaden their base of support, are trying to enlist the support of black politicians, ministers and business people.

Barry and his wife, Effi, made a surprise visit to the Convention Center on Wednesday, and they both joined Farrakhan on the stage during a two-hour rally that drew an estimated 10,000 people.

Beverly X, a Muslim spokeswoman, said Barry was not invited to the event. "It was an unannounced decision on Barry's part to come," she said. "We were very happy he came."

It was unclear what prompted Barry to attend the rally with Farrakhan, whom some blacks and whites criticize as a racist demagogue. Earlier in the day, in an interview with a group of black reporters, Farrakhan expressed sentiments of support for the mayor.

Sources said Barry was informed of Farrakhan's remarks, parts of which were aired on WHUR-FM Wednesday, before the rally.

Barry's surprise visit marked the second time in two days that he has invited himself to an event. Barry invited himself onto the stage Tuesday with African National Congress leader Nelson Mandela, who addressed a Convention Center rally. That visit by Barry drew complaints from some tour organizers that the mayor had disrupted the event.

Barry received standing ovations at both events, however, and seemed particularly buoyed by Farrakhan, who characterized him as a persecuted black politician "under attack" by the white establishment.

Farrakhan, in a speech last month, unleashed a scathing attack on local black politicians and said the Muslims, if elected, would not yield to temptations of drugs, drink and women, an issue that has been much discussed since Barry's Jan. 18 arrest at the Vista Hotel.

Asked yesterday by a reporter about Barry's drug use and conduct shown on the FBI videotape, Farrakhan, citing scripture, said, "Jesus would not be as hypocritical as those who are casting stones at the mayor."

Staff writer R.H. Melton contributed to this report.