A Fairfax County judge, his black robes swaying loosely as he walked, recently strode straight from his courtroom to the prosecutor's office to cut a deal for one of his private clients.

"I asked him to at least take off his robes first," recalled the shocked prosecutor.

The judge, who had momemtarily confused his roles, was a substitute serving under a controversial Virginia system that in Fairfax permits a dozen practicing attorneys to hear juvenile and relatively minor civil and criminal cases when regular judges in the state's lowest courts are absent.

The practice, which last year cost Virginia more than a half-million dollars in fees statewide, empowers substitutes to place juveniles in foster homes, revoke a drunk driver's license, preside over preliminary hearings in felony cases, levy fines of up to $1,000 and hand out sentences of up to a year in jail.

Beyond questions of limited experience and the lack of any special training, some prosecutors and court administrators are uneasy with the potential conflict of interest created by having one person perform two roles -- defense lawyer and judge.

"I don't think active criminal defense attorneys should be sitting on cases of any magnitude or deciding any critical points of law," said Fairfax County's chief prosecutor, Robert F. Horan Jr.

Horan cited a 1978 case in which Maj. John O. Feehan, the county's chief jailer, was charged with unlawfully using a prisoner to perform work at the home of Sheriff James D. Swinson, Feehan's boss.

Feehan pleaded guilty in General District Court before Substitute Judge Robert C. Watson, a Fairfax lawyer who appears regularly in that court as a defense attorney. Watson fined Feehan $25, although he could have given him up to one year in jail and a $1,000 fine.

Horan said Feehan's punishment was too light, especially since he was a public official guilty of official misconduct and since he had lied under oath when he was first asked about it and later recanted his testimony.

"I thought it was an extemely bad practice to a have a substitute judge sitting on that kind of case," Horan said, "and I still think it was a bad practice."

In the region, Virginia's system stands alone. Maryland and the District of Columbia do not use substitutes.

Nationally, the practice of using substitutes is also rare, according to Robert N. Baldwin, executive secretary of the Virginia Supreme Court. "A study for the state of California (on the use of substitutes) concluded that Virginia stands somewhat unique," Baldwin said. At least two other states, New Jersey and Oregon, use them, according to the National Center for State Courts in Williamsburg.

"Since the 1973 (Virginia) court reorganization, the basic tenet has been to move away from a part-time judiciary," Baldwin said.

But the state has been unable to come up with a workable alternative, a holdover from an era when part-time judges were common in Virginia, said Baldwin, whose duties include supervising the state courts.

Substitutes, who earn $130 a day serving when regular judges are sick, on vacation or away at judicial conferences, last year were paid a total equivalent to full year's salaries for 13 general district court judges. Those judges earn $40,000 a year.

They receive none of the training given new full-time judges, who attend a three-day orientation seminar in Richmond and, in Fairfax, are also sent for intensive two-week training at a national judicial center in Reno, Nev.

Substitute judges are appointed to six-year terms by the chief Circuit Court judge in each district, which in Fairfax is Judge Barnard F. Jennings. Fairfax has 11 full-time General District Court judges and 12 substitutes. The list of substitutes includes several practicing criminal lawyers and Horan's brother, Richard T. Horan, a Fairfax lawyer.

Substitute Judge Richard J. Colten said on his first day he heard four or five civil cases. "I'll never forget that day," he said. "I was very uneasy and unsure of myself. I wanted to do the right thing so bad it hurt."

"You have to shed your advocate's hat. It's difficult," said Colten, who as a lawyer is in District Court daily defending clients on such charges as shoplifting and drunken driving.

The chief judge of General District Court in Fairfax, Robert M. Hurst -- who was a substitute judge himself for three years -- said he is unaware of any substitutes acting improperly. They perform their jobs well, he said.

Several substitute judges also said they go out of their way to avoid even a semblance of impropriety, although some believe substitute work can work to their disadvantage.

Marc E. Bettius, a well-known Fairfax zoning lawyer, said that although he found the experience interesting, he recently resigned because, "If I sat (as a judge) all the time it would be an economic disaster."

Colten said he recently withdrew from representing a woman client in a divorce case because her husband complained Colten had been a judge in another case the husband had been involved in. "It cost me a hell of a lot of money," said Colten, adding that he usually has to disqualify himself from at least one case whenever he sits as a substitute.

In Virginia's Circuit Courts, where all felony cases are tried, substitute judges are forbidden by law. When a Circuit Court judge is absent, the judge's court will either close down or a retired judge will sit.

But the high volume of District Court trials make it impossible for them to close down even for a day, court officials said.

In 1978, the state's District Courts heard 1.7 million cases compared to 125,000 for the Circuit Courts. And, court officials said, the District Courts, established only six year ago, do not yet have a network of retired judges who could be used as substitutes.

Judge Hurst said all Fairfax judges have daily assignments that make it difficult for them to take on the case-loads of absent colleagues.

"There are no spare judges floating around doing nothing who can fill in," he said. "Everybody has to be somewhere."