Budget cuts have forced the D.C. Superior Court to end urinalysis tests that have routinely been given to virtually all criminal suspects in the city in the last 10 years to detect drug usage.

The $120,000-a-year program -- the only one of its kinds in the nation -- was used frequently by judges to help them decide whether a person charged or convicted of an offense in the District was released or stayed behind bars.

However, city and court officials confirmed that the drug-testing program, run by the city's Alcohol and Drug Abuse Administration in the basement of the courthouse, ceased operations Oct. 10 after a private contractor whom the city paid for the urinalyses increased its prices 40 percent.

Since 1971, almost all suspects detained in the Superior Court cellblock prior to their court appearance have been asked to provide urine specimens. The test results could be forwarded to the presiding judge within hours.

Because of the District's liberal pretrial release laws, most defendants remain free while awaiting trial. If, however, evidence of drug use is detected in a urinalysis, judges often set special conditions for release, such as mandatory attendance at a city drug clinic.

"It was a valuable tool in our making a decision on whether to release a person, and also in sentencing him," said one judge, "We miss it very much."

Probation officers found the drug-testing program a means to determine whether a defendant who was sentenced for a crime was in compliance with any provisions prohibiting drug use.

"I'm not usually an alarmist," said Alan M. Schuman, who runs probation services in the District, "but it takes the lid off any deterrent effect . . . [Previously] the defendant was made aware of the fact that if he was using narcotics, he could be detected and held responsible by the criminal justice system."

According to Bruce D. Beaudin, head of the D.C. Pretrial Services Agency, which makes recommendations to judges on pretrial release conditions, the termination of the drug-testing program may increase drug-related crime as word gets out that drug testing at the court has ended.

Some 1,800 urine samples were tested monthly at the court on a contract with a Miami-based firm called Precision Analytical, according to Dr. Kurt Brandt, acting medical director for the city's Alcohol and Drug Abuse Administration. However, the firm notified the city last August that its price for the drug tests would rise from approximately $10,000 a month to more than $14,000, for an annual total of $180,000 a year.That was more than the city could afford, Brandt said.

City and court officials are attempting to come up with the necessary funds to resume the program, but most were pessimistic about their prospects.

The drug testing faces another problem as well. The court's on-site laboratory testing facility ran into some trouble with a federal agency called the Health Care Financing Administration, which ordered the court testing facility to get a license as a medical laboratory, according to Brandt.

D.C. Superior Court Chief Judge H. Carl Moultrie I wrote a letter dated April 2, 1980, on behalf of the drug-testing facility, stating that the drug test results were not being used for medical purposes, and that "judges in the Superior Court do not engage in the practice of medicine."

For his efforts, the agency responded: "Moultrie's letter . . . is of interest, and has been noted."

"However," the response went on, "it is not within the jursidiction of Judge Moultrie to determine whether your laboratory requires a license . . . We also feel that Judge Moultrie as a result of his letter will now have to disqualify himself from possible litigation involving your lab."