ST. PAUL, Minn. (AP) -

A state agency is asking a court to throw out a lawsuit alleging that Minnesota taxpayers have been wrongfully charged for more than 37,000 abortions.

The Department of Human Services says in papers filed late Tuesday the lawsuit should be dismissed because the agency funds abortions for women on public assistance only when doctors certify them as medically necessary, as the law requires. It says the state is legally barred from prying into discussions between a woman and her doctor over her reason for seeking an abortion.

A hearing on the motion is scheduled before Ramsey County Judge Kathleen Gearin on Feb. 28.

A conservative legal group filed the lawsuit last month, claiming the state pays for abortions that aren't medically necessary, without the legal authority to do so.