Amid the dull colors of institutional life and distinct odors of fried chicken and fresh paint, D.C. Jail inmates yesterday laid their grievances at the feet of Mayor Marion Barry and Barry laid his at the feet of federal authorities.

It was the mayor's first tour of the crowded jail since U.S. District Judge William B. Bryant issued an order July 15 calling for a reduction in its population.

"We're here because the press asked to go in the jail and they can't go in without me," Barry said, hurrying down freshly painted corridors in the nine-year-old facility. "We're running a prison here, not a convenience store. You just don't walk in and out as you like."

Sentenced prisoners in blue overalls and pretrial detainees in orange overalls greeted the city's chief executive vociferously, some of them taking the opportunity to discuss their cases.

"I didn't do it," said Melvin Thomas, charged with bank robbery and murder. "I didn't do it."

The mayor questioned Thomas about his background and home life -- Thomas said he was a D.C. native who lived on the streets -- and later concluded that homeless men such as Thomas might live better in jail than outside.

Whisking the entourage of 30 media representatives and government officials into the kitchen, the mayor inspected the luncheon fare of fried chicken, greens, mashed potatoes, applesauce and white bread and observed, "I tell you, they eat better than I do."

In the forensic unit, where inmates with mental disorders are housed, one man shouted, "Hey, mayor, are you going to run for reelection next year?"

"Yeah," responded Barry, in what appeared to be the first public confirmation of his intention. "Are you going to vote for me?"

The mayor visited parts of the jail that appeared to be clean and well-maintained and did not tour those areas where extra bunks are set up in day rooms for overflow inmate population. The jail's population yesterday was 1,943, with a court-ordered ceiling for the weekend set at 1,990, corrections officials said. By Nov. 22, it must be down to 1,694. The official capacity is 1,356.

Barry was received clamorously by residents of the jail's female unit, one of whom spilled several trays of food in the hall outside the unit just as the mayor approached the security door entrance.

"Did I upset you, young lady?" Barry asked Claudette Hall, as television crews and print reporters jostled to hear the conversation.

Inside the unit, Bernice Thompson and others were complaining that they had been forced to clean up the day room and corridors because the mayor was coming.

"The only reason we're painting is because he was going to be here," said Thompson, in jail on a theft charge. Another inmate insisted she had been forced to clean some steps with a toothbrush.

"Some of them say they cleaned the place up for the mayor," Barry said later. "That's not necessarily true . . . . They paint every other day. It keeps them busy."

The mayor completed the tour with an inspection of the jail's education center. Leading the group into a class of students preparing for a high school equivalency exam, Barry exclaimed, "This is a success story right here, a 38-year-old who's taking her G.E.D."

Ethel Donerson, awaiting trial on a charge of distributing drugs, said she appreciated the mayor's interest in her studies. "I'm glad somebody is caring."

After the tour, Barry announced that the District corrections system, despite the pressure applied by the judge's order, is "doing better than Maryland. Certainly much better than Virginia."

He accused the federal government of "dragging its feet" and said that if the Federal Bureau of Prisons, which is now taking custody of newly sentenced District prisoners, doesn't absorb more of the District's inmates, he would consider marching about 300 inmates down to the Justice Department to hand them over to the U.S. attorney general, who technically has responsibility for them.

Finally, the mayor told reporters, he believes public safety has not been compromised by moving some prisoners near the end of their terms to halfway houses.

"If they are walking away from halfway houses," he said, "it is Judge Bryant's responsibility."