WASHINGTON — Lawyers for a Utah abortion doctor charged with murder for the death of a fetus in Maryland asked a judge Friday to throw out the charges, arguing she is immune from prosecution and that the state is trying to infringe upon a woman's right to terminate a pregnancy.

Dr. Nicola Riley and her former colleague, Dr. Steven Brigham of New Jersey, were indicted last month under a law that allows murder charges to be brought in the death of a viable fetus. The 2005 law had only been used previously for cases in which defendants were accused of assaulting or killing pregnant women, and prosecutors have acknowledged they are in uncharted territory by using it to charge abortion doctors. Thirty-seven other states have similar statutes.

At Riley's bail review hearing Friday in Cecil County Circuit Court in Elkton, Md., attorney Stuart O. Simms argued that prosecutors were attempting to criminalize constitutionally protected medical treatment.

"Based on their interpretation of the statute, they are now threatening to charge any medical professional in Cecil County with a state crime," Simms told The Associated Press after the hearing.

Judge Keith Baynes set bail for Riley at $300,000, the amount requested by Deputy State's Attorney Kerwin Miller, who argued that the evidence against the 46-year-old Salt Lake City resident is strong and characterized her as a flight risk. She was arrested Dec. 28 on a fugitive warrant and was extradited to Maryland on Thursday.

"It gets no bigger than this," Miller said in reference to Riley's first-degree murder charge, the Cecil Whig of Elkton reported.

Riley posted bail shortly after the hearing and was released from custody. As a condition of her release, she was ordered not to perform abortions.

Miller and State's Attorney Ellis Rollins did not return messages seeking comment. They have declined to speak to reporters since they were criticized by Riley's attorneys for discussing the indictment publicly while it was still under seal.

The charges against Riley stem from a botched abortion in August 2010 at Brigham's Elkton clinic. The 18-year-old patient suffered serious injuries, and Riley drove her to a nearby hospital rather than call 911, according to medical regulators. The fetus was 21 weeks old. Doctors generally consider fetuses to be viable outside the womb starting around 23 weeks.

Brigham, of Voorhees, N.J., has been charged with murder in the death of that fetus and four others. He was released from custody Jan. 6 after posting a $500,000 bond. His attorney has also argued that Brigham has not violated the fetal homicide law.

Riley's Maryland medical license was suspended over the August 2010 incident, and Brigham was ordered to stop practicing medicine without a license in Maryland. Regulators discovered that Brigham was beginning second-trimester abortions in New Jersey and having patients drive themselves to Elkton the next day to complete the procedures.

Brigham was not authorized to perform abortions in New Jersey after the first trimester, and regulators called his actions manipulative and deceptive. He also lost his New Jersey license, leaving him without a valid license in any state.

In Maryland, licensed physicians can perform abortions before the fetus is deemed capable of surviving outside the womb, and abortions of viable fetuses are permitted to protect the life or health of the mother or if the fetus has serious genetic abnormalities.

The state's fetal homicide law was approved in 2005 in the wake of the highly publicized slaying of Laci Peterson in Modesto, Calif. Peterson was seven months pregnant, and her husband, Scott Peterson, was convicted of killing both her and their unborn son.

The law specifically exempts licensed physicians performing abortions. Before the bill was passed, its sponsor, Delegate Charles Boutin, wrote in a letter to a committee chairman that it is "clearly and solely a victim's rights bill. It takes care of the 'Laci Peterson' issue in Maryland, while protecting a woman's right to choose."

"The General Assembly never intended for doctors to be prosecuted at all for performing abortions, let alone convicted and subjected to criminal penalty," Riley's attorneys argued in their motion to dismiss the indictment.

Anti-abortion activists have hailed the arrests of Brigham and Riley, saying the charges shed light on the troubling practices of certain abortion doctors. A search of Brigham's Elkton clinic revealed a freezer containing 35 late-term fetuses, including one believed to have been aborted at 36 weeks, according to documents released by medical regulators.