An Anne Arundel County Circuit Court judge today imposed a 10-day ban on the use of Medicaid funds to pay for nontherapeutic abortions in Maryland, setting the stage for the first state court test of the controversial public policy.

The ruling, which applies through-out the state stops Maryland officials from paying for so-called elective abortions for poor women until Dec. 8, when Judge Bruce C. Williams will hold a hearing to determine how long the ban should last.

"It says we can't pay," observed George A. Nilson, a depute attorney general for Maryland. "The state will withhold checks until time as we can dissolve the injunction. We're not proposing to defy the injunction at this point."

Judge Williams issued his degree at 9:15 a.m., a few minutes after three Maryland residents filed a suit contending that public financing of abortions is illegal, wasteful and causes "excruciatingly painful and grotesque injury and death" on unborn children.

The order was "ex parte," or one-sided, issued in the judge's chambers without first notifing state officials or hearing their arguments. An ex parte injunction is considered unusual and Judge Williams' action angered state officials.

"I think Judge Williams jumped a little hastily," said Maryland's Acting Gov. Blair Lee III, who was named as a defendant in the suit along with the state treasurer, state comptroller and secretary of health and mental hygiene.

Judge Williams could not be reached for comment late today. In his order, which apparently was prepared by those bringing the suit, he said that playing state funds for elective abortions "is without constitutional or statutory authority."

The court action comes three weeks after Maryland officials reached a temporary administrative decision to continue state funding of nontherapeutic abortions until the General Assembly has an opportunity to consider the issue beginning in January.

Public financing of abortions in this heavily Catholic state is a bitterly divisive issue and is expected to be major issue in the coming legislative session. Last year, Maryland spent $1.4 million of state and U.S. funds for 6,000 abortions.

The issue become especially intense in Maryland and other states in June after state and local governments are within their right if they decline to pay for abortions.

Early this month, Maryland's attorney general said that the state lacked the legal authority to pay for elective abortions and would have to stop the policy unless the state health secretary drafts regulations outlining how the money is to be used.

Health Secretary Dr. Neil Soloman said he would promulgate the necessary guidelines allowing for the use of Medicaid funds until the end of this fiscal year, June 30, 1978. The legislature will have to decide if the funds should continue after that, he said.

New legislation already have been proposed by Solomon's department but a legislative committee refused to approve them on an emergency basis. Solomon can adopt the regulations without legislative concurrence after a public hearing, now scheduled for Dec. 9.

The 10-day court injunction was criticized today by probation advocates as a further erosion of poor women's rights to obtain abortions. Even the short interruption of 10 days further clouds the poor's understanding of their rights, it was argued.

The current lack of state regulations and legal authority to use Medicaid funds for abortions served as the basis for the suit filed today. The three plaintiffs have asked for a permanent halt to use of the state fund for abortion.

The three plaintiffs are Dr. Daniel J. Boyle and Lola Alice Kindler, both of Silver Spring, and Marilyn Szewezyk of Baltimore County. None of the three plaintiffs could be reached for comment today.