Three men and two women sat in a high school cafeteria recently, nervously waiting to tell a small group of voters why they should be elected Montgomery County Circuit Court judges in this fall's balloting.

Just a few hours earlier, four of the candidates had sat in long, black robes and presided over trials in the circuit court.

Under Maryland law, newly appointed circuit court judges must run for reelection to a 15-year term in the first general election following their appointment. The requirement affects all four of Montgomery County's incumbent judges who have been appointed in the last two years: James S. McAuliffe Jr., Rosalyn B. Bell, Irma S. Raker and William C. Miller. Until the primary election Sept. 14 they must play the dual roles of nonpolitical, impartial judges and politicians gathering votes.

Bell, 59, the senior jurist in the group, was named to the circuit court in May 1980, and McAuliffe, 51, was appointed last year. Raker, 44, and Miller, 52, were named last spring.

Sitting judges are rarely challenged in their mandatory bid for reelection, but the incumbents this year face an aggressive opponent in Chevy Chase lawyer Peter J. Messitte.

Messitte, 41, who said he has been passed over twice for recent judicial appointments, said he is determined to win a seat on the bench this fall.

"There's no question that I can be a top judge, if not the best in the circuit court," Messitte declared at a recent candidates' forum. "My record speaks for itself. I'd be delighted to have the public compare my background with any one of the sitting judges."

Miller, who was appointed to the circuit court in May, joked with the same audience: "I'm here tonight to see if I can save my job . . . . I've got five kids to feed."

"The other sitting judges and I have all served on the district court together," Miller said. "We have worked as a team . . . . We all made it through a very difficult selection process. Our opponent did not."

In an effort to pool their financial resources and their political clout, Miller, Raker, Bell and McAuliffe have formed a slate. Their campaign literature declares that the candidates' character, integrity and legal knowledge "have been carefully evaluated and approved . . . ."

"They are doing their jobs well, and should be retained," one of their pamphlets declares. "By supporting them, you'll be helping Montgomery County to maintain an independent, qualified, nonpolitical judiciary."

The four sitting judges also have been endorsed by the Democrats for '82, a slate of nearly three dozen incumbents across the state ranging from Gov. Harry Hughes to Montgomery County Executive Charles W. Gilchrist and county Sheriff James Young, and by the Montgomery County Republican state central committee. The judges' names will appear on both the Democratic and the Republican primary ballots.

But since the judicial canon of ethics prohibits judges from endorsing political candidates, a disclaimer outlines their relationship with the Democrats for '82.

"We told the Democrats that we wanted their endorsement, but that as judges it would be unethical for us to endorse them," McAuliffe said. "They have agreed and the campaign literature will carry a disclaimer to the effect that we have not endorsed the other Democratic candidates."

Messitte, who is permitted by law to run in both the Democratic and the Republican primaries, said he is opposed to judges forming campaign slates among themselves or running on tickets with other candidates.

"The canons of judicial conduct of the American Bar Association make it crystal clear that a judge may not speak on his or her own behalf when they are a candidate for election," Messitte said. "Slating of judicial candidates necessarily implies that one candidate is endorsing another and suggests that all of the members of the slate share a common philosophy."

In addition, Messitte said he opposes the slating concept because he said it allows the strengths of one candidate to "cover the weaknesses of another."

Messitte said he believes the selection process that has twice denied him a seat on the circuit court bench is unfair because it excludes the public from the initial selection and evaluation of judges, and because choices frequently are based "on cronyism, rather than quality."

In Maryland, the selection process begins when there is a vacant judgeship and a citizen with a law degree and at least five years of legal experience either submits his name or has his name submitted by a local bar association to the circuit's judicial selection commission.

The commission, which consists of lawyers and citizens in nonlegal professions, then chooses a list of the most qualified applicants. The list is submitted to the governor, who reviews the candidates and makes an appointment.

In the Sixth Judicial Circuit, which includes both Montgomery and Frederick counties, Frederick County District Court Judge Stanley Y. Bennett, 47, named to that court 11 years ago, is campaigning for a circuit court seat currently held by Judge William W. Wenner, 51, who was appointed to the bench in May 1980.

Incumbent Judge Wenner advocates a judicial selection process that would provide uniform terms for judges at all levels of the court, rather than the elections now required.

But his challenger, Bennett, would like to see more contenders for each court vacancy. "The best way to select judges is to encourage all those who meet the qualifications by law . . . to submit their names to the governor," Bennett said.

Messitte, the challenger in Montgomery County, said he has won national acclaim in the legal field for defending individuals' rights to privacy, and for representing victims of sex crimes and tenants threatened with condominium conversions.

"A lot of the judges on the bench simply have not had the kind of legal experience I've had," Messitte said. "Many of them are former prosecutors and former attorneys for big insurance companies . . . . They were appointed to judgeships because they're part of that Rockville crowd."

Messitte maintains that the "Rockville crowd" is a group of highly influential lawyers who work to get each other nominated for judicial appointments.

Miller, whose law practice was based in Rockville, has accused Messitte of challenging the incumbents in an effort to "disrupt the judicial selection process."

"What we have here is a candidate who couldn't get (a judicial appointment) through the front door; now he's trying to get in through the back," Miller said. "Mr. Messitte would like to take issue with our slate because he can't be on it."

Joseph P. Burke, chairman of the judicial selection commission for the Sixth Judicial Circuit, said he is opposed to the law that requires circuit court judges to run for reelection after they are appointed.

"It's regrettable that judges have to attempt to remain impartial and at the same time climb into the political arena and compete for votes," said Burke. "To conduct a political campaign, a judge needs money. Traditionally, to get the money, you have to affiliate yourself with a political party and adopt its philosophy."

Burke said that, instead of elections, he would prefer judicial appointments that have long tenures and a review process that would make it possible to get rid of judges who were performing poorly.

"I feel the same about picking judges as I do about picking doctors," Burke said. "I don't want somebody who was elected 'brain surgeon' to fool around with my brain on the operating table. He may be a brilliant politician but an unskilled physician.