Nearly two dozen states and municipalities sued the federal government Tuesday to stop a new rule that lets health care clinicians decline to provide abortions and other services that conflict with their moral or religious beliefs.

The lawsuit in Manhattan federal court asks a judge to declare the rule unconstitutional and say it was passed in an arbitrary and capricious manner. The rule was issued by the Department of Health and Human Services and is scheduled to take effect in July. San Francisco had previously filed a similar action.

The department has said the rule requires hospitals, universities, clinics and other entities that receive federal funding to certify compliance with some 25 federal laws protecting conscience and religious rights.

Most laws pertain to medical procedures such as abortion, sterilization and assisted suicide.

The department has previously said that past administrations haven't done enough to protect such rights in the medical field.

The suit is being brought by Colorado; Connecticut; Delaware; the District of Columbia; Hawaii; Chicago, Cook County and the state of Illinois; Maryland; Massachusetts; Michigan; Minnesota; Nevada; New Jersey; New Mexico; New York City and state; Oregon; Pennsylvania; Rhode Island; Vermont; Virginia; and Wisconsin.

A spokesman for federal government lawyers declined to comment on the lawsuit.

The city of San Francisco sued over the regulation on May 2, hours after President Donald Trump announced it during a White House Rose Garden speech marking the National Day of Prayer.

New York Attorney General Letitia James said the new lawsuit is meant to stop the federal government from "giving health care providers free license to openly discriminate and refuse care to patients."

She called it a "gross misinterpretation of religious freedom that will have devastating consequences on communities throughout the country."

According to the lawsuit, the rule drastically expands the number of health providers who can refuse to provide services, allowing everyone from ambulance drivers to receptionists and customer service representatives at insurance companies to cite the rule.

The lawsuit said the rule conflicts with various state laws requiring health care professionals to carry out certain actions even if they cannot comply with some health-care directives for reasons of conscience.