Montgomery County prosecutors, seeking to ensure that so-called "master thief" Bernard Charles Welch Jr. never goes free, brought him into court yesterday on 21 county charges ranging from rape to theft.

County Circuit Court Judge Richard Latham ordered Welch held in the Montgomery Detention Center on $700,000 bond until he faces trial on the charges in December and January.

Welch was convicted in May of murdering Washington cardiologist Michael Halberstam and sentenced to serve 143 years to life for that crime, a weapons charge and nine other counts of burglary and grand larceny. He was brought to Montgomery County from the federal maximum security prison at Marion, Ill.

Officials in Montgomery said they are prosecuting Welch despite the existing life sentence in order to ensure that he will not somehow go free again.

"If at some point in the future the District of Columbia conviction is overturned, Welch would walk away a free man," said Montgomery State's Attorney Andrew Sonner. "We would like to see that Welch is convicted and sentenced in Maryland for his criminal conduct."

Welch has appealed his District of Columbia convictions after abruptly firing his attorney, Sol Z. Rosen.

Welch faces seven separate trials in December and January for his alleged one-man crime wave across the county, stretching from Rockville to Potomac between January and December of 1980. The last incident in which he is charged, a Dec. 2 housebreaking in Kensington, occurred just three days before Welch shot and killed Halberstam during an aborted burglary.

Welch was escorted here Tuesday from the Illinois prison by U.S. marshals aboard a chartered airliner, and his brief court appearance was marked by heavy security.

Dressed in an open-necked tan dress shirt, green slacks and tennis shoes, Welch was quiet and unassuming when answering the judge's routine questions.

He has a thick moustache, and his longish hair, dipping slightly below his shirt collar, has fully grown out since he shaved his head and eyebrows to avoid identification in a District of Columbia police lineup.

At the detention center where he will live in isolation in a single cell, Welch will be allowed to shave, but "we will be awful cautious with the materials we give him," said center director Samuel Saxton.

Saxton said that Welch, who has escaped from prison in the past, will be kept under virtual round-the-clock observation, with a guard looking in on him every half hour. A special committee will determine whether the security level is adequate.

"If you divide the day into 24 hours, that means we will be looking at him 48 times in one day," Saxton said. "I'm not one of those guys who's superconfident," he said, "but I'm not unnerved about the fact that he came here."

After the Montgomery trials are completed, Welch still faces rape, burglary and firearms charges in Fairfax; 18 counts of burglary and larceny in Arlington; three counts of burglary and grand larceny in Alexandria, and a prison escape charge in New York.