As his perjury and drug possession trial entered its fifth week, D.C. Mayor Marion Barry was lionized yesterday by hundreds of chanting supporters as a visionary leader and a black politician unfairly targeted for investigation by federal authorities.

About 2,000 people converged downtown at Freedom Plaza for a lunchtime rally that was marked by as many angry denunciations of the federal government's role in Barry's drug arrest and prosecution as praise for Barry's three terms in office.

Speakers at the rally invoked powerful symbols of racial pride and racial hatred in lauding Barry and castigating U.S. Attorney Jay B. Stephens, U.S. District Court Judge Thomas Penfield Jackson, who is presiding over the mayor's trial, and the news media that have devoted enormous resources to covering the case.

Barry appeared at the rally during the customary noontime break in the trial and was joined late in the program by his wife, Effi. The mayor avoided direct criticism of Stephens and Jackson, but did assert at one point that he was one of several "black elected officials all over the land who unfortunately have been harassed and harangued by U.S. prosecutors."

Abdul Alim Muhammed, a top official in the Nation of Islam, characterized Barry's prosecution as a "lynching" and said television stations and networks are "no better than some gang of rednecked, tobacco-chewing Ku Klux Klan" members for extensively broadcasting the FBI videotape of the mayor's Jan. 18 arrest at the Vista Hotel.

"This is not the kind of country where some judge and some hangman that's called a U.S. prosecutor can subvert the political process, because that's really what it's all about," Muhammed said. "They know that they could never defeat the mayor at the election place. They know they could never defeat him by running a candidate against him.

"What we are witnessing is a subversion of democracy, a subversion of the process of government," he added.

Kris Ostrowski, news director of WRC-TV (Channel 4), the first Washington station to air excerpts of the videotape, said she does not believe local stations went overboard in airing the arrest footage.

"It was not overkill," she said. "People had been hearing about the videotape, speculating about the videotape. We had an obligation to air the videotape."

The remarks of Muhammed, a Maryland congressional candidate, drew an enthusiastic response from the crowd, which included dozens of D.C. government workers, members of Barry's cabinet, teenagers in the Marion Barry Youth Leadership Institute and other longtime supporters of the mayor.

Other speakers at the rally included City Administrator Carol B. Thompson, who praised Barry's "remarkable" record of service; the Rev. Willie Wilson, who sponsored a mass meeting at his church in Southeast Washington last night to protest the "electronic lynching" of the mayor; a public housing resident; and two young people who had attended Barry's leadership program.

Norm Nixon, a Barry prote'ge' who acted as master of ceremonies, said, "We don't need no fancy titles, no MDs or whatever behind your name, to let the nation know, let the world know, that we love our mayor here in Washington, D.C."

"It's not a funeral because the mayor's not dead by a long shot," Nixon added. "It's not time to say goodbye."

Several members of the audience said they came to show solidarity with Barry at a time of duress for him, and out of respect for his accomplishments as mayor. Some said he was an enduring symbol of black pride; others said he was a victim of racial prejudice.

"He's a strong black man who was set up, lured -- you name it, they did it to him," said Dwayne Wigfall, 31, of Prince George's County. "As long as he doesn't take money from the government, as long as he doesn't bring drugs to the city, he's all right. As far as what he does morally, I can't speak to that. Let God be the judge of that."

"I'm here in support of the mayor," said Shirley Courtney, a private school teacher who lives in Northeast Washington. "I think he's being dealt with unjustifiably in the court . . . . It is not a good case. It was a setup. Everyone has a public face and a private face, and that was his private business they have no business dealing with."

Ardelia Wooden, 75, of Trinidad Avenue NE, said, "I'm strong for him -- that's all I can say.

"The other little mistakes that he made -- like the drugs and the liquor -- other people have done them, and I forgive him," Wooden said.

Anwar Saleen, 35, a hair salon owner and Ward 1 Democratic activist, said he was angered by the "aggressiveness" of the federal investigation against Barry.

"I don't like what I saw on tape," Saleen said. "They tracked him like a dog. And you can track anyone like a dog and find something on him."