Close friends of D.C. Mayor Marion Barry's sent out signals yesterday that the mayor would consider a plea agreement with prosecutors, but only if it allowed him to plead guilty to misdemeanors, not felonies, and contained a provision sealing all evidence of his alleged drug involvement.

The friends, who have talked with Barry in recent days about a possible plea, emphasized that no negotiations with prosecutors have taken place, and sources close to U.S. Attorney Jay B. Stephens said that if any talks start today, the two sides would be far apart.

The plea issue could arise today, after U.S. District Judge Thomas Penfield Jackson rules on a defense motion to split the case against Barry into two trials. The ruling, which is expected to go against Barry, could be a catalyst for plea negotiations, according to sources close to both sides.

According to Barry's friends, the mayor appears to be considering a plea much the same as he would a political decision. Said one associate, "He is talking to people who are close to him and running over the possibilities."

However, a source close to Stephens said the U.S. attorney has made it clear to his assistants that he would insist that any agreement include a plea to a felony. "If the mayor is talking misdemeanors, then he's dreaming," said the source.

The distinction is important, because if Barry were convicted of misdemeanor cocaine possession he could, as a first-time offender, be placed on probation. If he were convicted of a felony -- he is facing three felony counts of lying to a grand jury -- he almost certainly would receive a prison sentence under federal sentencing guidelines. Barry would not be eligible to serve as mayor if he is sentenced to prison.

Barry is facing a 14-count indictment that charges him with three counts of perjury, 10 counts of cocaine possession and one count of conspiracy to possess cocaine. Jackson has scheduled jury selection to begin June 4.

It was Jackson who decided against sentencing former presidential adviser Michael K. Deaver to prison in 1988 after Deaver was convicted of lying to Congress and to a grand jury; he placed Deaver on probation for three years, fined him $100,000 and ordered him to serve 1,500 hours of community service.

But Deaver's crimes were committed before federal sentencing guidelines took effect -- guidelines that have deprived judges of most of their discretion in deciding punishment.

Sources on both sides said yesterday that if Barry begins plea negotiations, the talks would likely be complicated. In addition to agreeing about the specific charge or charges to be included in the plea, the sides would have to decide these issues: Barry's cooperation in future investigations. Without an agreement on cooperation, prosecutors would be legally unable to request that Jackson deviate from sentencing guidelines and place the mayor on probation after being convicted of a felony. Sources close to the mayor said Barry has ruled out cooperating with a grand jury that is investigating city government. Barry's resignation. Stephens said two days after the mayor was arrested that he would consider the community's interests as a significant factor in negotiations. Sources close to the mayor said Barry would prefer to serve the six months remaining in his term and agree not to seek reelection. Additionally, the sources said, Barry would consider agreeing not to seek elective office within the next several years. Sealing the record. Sources on both sides said this issue could be the most difficult to resolve.

Barry associates said the mayor would want an agreement that prosecutors file the videotape of the Vista arrest under seal. Stephens, who in his two years as U.S. attorney has demonstrated a penchant for secrecy in cases against public officials, is expected to take a different approach this time, sources said.

Stephens reportedly has told his assistants that the public is entitled to see the videotape and draw its own conclusions.