The House Appropriations Committee on Wednesday voted to block a new Trump administration rule allowing health workers to refuse services that violate their religious beliefs.

The measure by Rep. Barbara Lee (D-Calif.) would prevent spending to implement the new rule, which Trump announced last week during a speech before faith leaders. The broad new rule allows health-care providers, insurers and employers to refuse to provide or pay for services that violate their religious or moral beliefs, such as abortion or assisted suicide.

“This dangerous and discriminatory rule attempts to enshrine discrimination in virtually all facets of health care by granting new rights to those who believe their personal beliefs should determine the care a patient receives,” Lee said, warning that the result could be a transgender patient being denied needed medical care, or same-sex couples unable to get fertility treatments, or a rape survivor who can’t get birth control.

“Personal beliefs should never determine the care a patient receives,” Lee said.

Republicans argued against Lee’s amendment, describing it as a “poison pill” that would ensure that the broader legislation being debated Wednesday — a sweeping spending bill for the Health and Human Services, Labor and Education departments — would never become law.

“The activities of the administration aren’t denying anybody medical care. This amendment would force people to perform procedures that they find morally repelling,” said Rep. Tom Cole (R-Okla.). “This amendment would block the free exercise of civil rights of all Americans.”

Lee’s amendment passed on a party-line vote of 30-23. It was one of several abortion-related measures that sparked contentious partisan back-and-forth Wednesday, in a preview of debates to come as Congress heads toward the 2020 elections.

The underlying spending bill contains language aimed at blocking another new Trump administration rule, this one described by critics as a “gag rule” that limits the ability of health providers such as Planned Parenthood to discuss abortion as an option for patients. A GOP amendment seeking to remove that language was defeated.

And earlier in the day, Democrats defeated a GOP effort to impose new requirements related to babies born alive after attempted abortions, after emotional debate featuring a pregnant GOP congresswoman and her personal story.

Rep. Jaime Herrera Beutler (R-Wash.), who is expecting her third child at the end of this month, spoke in support of the amendment that would block funding to entities that provide abortions unless practitioners abide by certain requirements in the rare case of babies born alive after attempted abortions. The requirements include ensuring that the child is “immediately transported and admitted to a hospital.”

Herrera Beutler discussed her pregnancy with her first child, Abigail, now 6, who was born without her kidneys but is doing well. She said she was urged by multiple health-care providers to end that pregnancy, finally finding a doctor who would follow her wishes to carry the baby to term.

“I just think how many other instances are there?” an emotional Herrera Beutler told the committee. “Most of these are moms who want these babies. They’re not wanting to terminate late because they didn’t want the pregnancies. It’s because there’s a problem and they were told there’s no chance.”

But Democrats on the committee forcefully rebutted arguments from Herrera Beutler and others in favor of the amendment, which was offered by Cole.

“This amendment is a ruse, a ruse to ban safe and legal abortion in the United States,” said Rep. Rosa L. DeLauro (D-Conn.), who chairs the appropriations subcommittee on Health and Human Services. “That a woman could have an abortion as she gives birth is flat-out untrue. It is simply not how medicine works.”

Cole’s amendment was defeated 23-29, mostly along party lines. One Democrat, Rep. Henry Cuellar (Tex.), voted with the Republicans.

The amendment votes came as the Appropriations Committee debated a mammoth $190 billion spending bill for HHS, Education, Labor and other related agencies, ultimately passing it on a party-line vote of 30-23. The legislation would still have to pass the full House and be merged with a Senate version that’s yet to be written, as Congress gets off to a slow start in a 2020 appropriations process that appears destined to end in a Sept. 30 pileup amid the threat of another government shutdown.

Republicans have repeatedly pushed votes in the House and Senate this year related to “born-alive abortion.”

The Republican push to pass these bills followed efforts in New York and Virginia to roll back restrictions surrounding late-term abortions, which represent a small minority of hundreds of thousands of abortions performed in the United States each year. Those abortions, experts say, typically are prompted by concerns for the mother’s health or fetal abnormalities. The topic also flared into controversy after comments by Virginia Gov. Ralph Northam (D) that Republicans claimed suggested he favored killing live babies.

According to statistics from the Centers for Disease Control and Prevention, 1.3 percent of abortions in 2015 were performed at 21 weeks’ gestation or later. About 91 percent took place at or before 13 weeks of gestation.