D.C. Mayor Marion Barry was sitting in the next-to-last row at an ethics seminar yesterday morning with most of his top aides when Police Chief Maurice T. Turner Jr. slipped into the room and whispered into his ear. The two men quickly moved into the hall at the Washington Convention Center to greet City Administrator Thomas M. Downs, who had just arrived from the violence-torn Lorton Reformatory complex wearing jeans and a sports shirt that said "Members Only."

For Barry, the best-laid plans had gone awry. Instead of discussing ethics, the men huddled for a briefing on shots fired, buildings burned, inmates rising up.

A day that would have highlighted the mayor's concern about the politically sensitive issue of ethics in government was snatched away by another volatile issue: prison overcrowding and violence.

"Why do you keep harassing me?" Barry had said earlier in the morning when reporters asked repeatedly for comment on fires set by Lorton inmates and reports of gunfire. "Mr. Downs is the spokesperson for the city on that matter."

Initially seeking to steer clear of commenting on the Lorton situation, Barry stuck rigidly to his schedule, kicking off the first session of his much-publicized ethics training program and introducing his new ethics ombudsman, retired jurist Catherine B. Kelly.

The session was open to the news media, but with a few exceptions the attention of the city's local reporters was focused elsewhere: the Lorton complex, home of one of the most troublesome issues facing the Barry administration.

By midday the mayor had reversed his posture, taking the lead at a news conference. With Barry out front, his political critics fired freely from the wings at the two-term mayor seeking reelection to a third. The mayor's ethics thrust had been blunted.

"Immoral, awful, totally inexcusable," said mayoral challenger Mattie Taylor, blasting Barry for mismanagement.

"That is absolute obscenity ," said Alvin Bronstein, head of the American Civil Liberties Union's National Prison Project, in an allusion to Barry's claim that the uprising was sparked by publication of a consultant's report predicting violence.

"He is going to have to take the rap for this," said D.C. Council member Carol Schwartz (R-At Large), another mayoral candidate.

A separate chorus of boos came echoing across the Potomac from Virginia politicians.

Fairfax County Board Chairman John F. Herrity, charging that the city government had ignored warning signs of disaster at Lorton, said, "I just don't think the District has taken it seriously enough." And Rep. Stan Parris (R-Va.), who represents the Fairfax County area and is a senior member on the critical House District Committee, was calling for a congressional hearing into prison overcrowding.

A day that might have produced good publicity about Barry's efforts to counter corruption allegations in his administration had turned into a Barry-bashing session.

Asked whether he believed the Lorton disturbance, coming two months before the Sept. 9 Democratic primary, would harm him politically, Barry shrugged, "I don't mind. Nobody is blaming me for starting the fire."

But as council member John Ray (D-At Large) pointed out yesterday, the corrections issue "is a problem he is going to have to deal with throughout the campaign and it is going to be one of the problems that he is going to have very little control over."

For Barry, city politicians agree, the unpredictable spark of a prison uprising illuminates the dark side of incumbency. While Barry has been successful in using his office to control the political agenda at times, the Lorton inmates showed early yesterday morning that an incumbent mayor can quickly become vulnerable to his critics.

Barry could defuse the criticism by unveiling his plans for a new prison in the District, Ray noted, but because of neighborhood opposition to it, he is unlikely to do so until after the election. "Ultimately the mayor may end up losing more votes down the road -- maybe not in the primary but in the general election -- by not taking action," he said.