A U.S. District Court judge yesterday blocked the Justice Department's Office of Juvenile Justice and Delinquency Prevention from cutting off funds to the National Juvenile Law Center in St. Louis.

The court order will allow the law center to finish all of its pending cases, while the center pursues a separate lawsuit seeking funding for new cases.

The case has been regarded as the first test of plans by Alfred S. Regnery, recently confirmed as head of the juvenile justice office, to shift funds away from litigation and delinquency prevention programs into efforts to punish serious young offenders.

Mona Lyons, who represented the National Youth Center in the case, said that since 1978, the office has provided the program with funds to "initiate class-action lawsuits and other broad impact litigation in a number of states to enforce the Juvenile Justice Act."

She said that Regnery, who became acting director of the office last November, "summarily" cut off all funding last March, "saying he did not believe in litigation."

According to the opinion by U.S. District Court Judge Joyce Hens Green, the program had received a two-year grant of $997,071 in November, 1978, which was renewed for another two years in 1980. Meanwhile, the opinion said, program officials had been assured that whatever happened to the grants, they would be given enough funds to complete their existing case load.

The center currently has 10 cases in the courts, including two involving pretrial detention of juveniles in Puerto Rico and Tennessee.

While "Regnery has confirmed that he does not consider it an appropriate use of federal funds to bring suits on behalf of juveniles against state and local governments," Green said that the Juvenile Justice Act does authorize such centers to bring that type of litigation.

She called Regnery's action "an improper attempt to affect substantive outcomes pending before the courts."

Drew McKillips, a spokesman for the Office of Juvenile Justice, said that Regnery will have no comment on the decision.

The department has made no decision on whether to appeal the ruling.