Critics of President Donald Trump's “conscience rule” for healthcare providers say it would allow discrimination based on sexual orientation and gender identity.

Trump announced the rule during a National Day of Prayer speech he delivered in the White House Rose Garden. A final version was announced on Thursday.

The Trump administration claims the rule is needed to protect healthcare providers who object to certain procedures from discrimination.

“[The rule] protects individuals and health care entities from discrimination on the basis of their exercise of conscience in HHS-funded programs,” the U.S. Department of Health and Human Services Office for Civil Rights said in a statement.

Critics of the rule say it will protect healthcare workers who refuse to perform abortions based on their religious beliefs and allow such providers to discriminate against the LGBT community.

The National Center for Lesbian Rights (NCLR) said in a statement that the new HHS rule would encourage denials of health care to patients.

“This rule does not just implement existing federal conscience protections for healthcare providers, it dramatically expands them in ways that will lead to dangerous denials of reproductive health care, and put vulnerable populations, including LGBTQ people, at risk of increased discrimination,” said Julianna S. Gonen, policy director at NCLR. “We’ve seen firsthand, through our Legal Help Line and our Rural Pride campaign, that health care discrimination against LGBTQ people is already pervasive and causes serious harm to individuals and families. In many communities in this country, LGBTQ people routinely face open hostility and outright denials of care from doctors, hospitals, therapists, and other health care providers. Rather than addressing this serious problem, HHS issued a rule that will make it worse.”

The Human Rights Campaign (HRC), the nation's largest LGBT rights advocate, called the rule an “attack” on LGBT people.

“The Trump-Pence administration’s latest attack threatens LGBTQ people by permitting medical providers to deny critical care based on personal beliefs,” HRC Government Affairs Director David Stacy said in a statement. “The administration’s decision puts LGBTQ people at greater risk of being denied necessary and appropriate health care solely based on their sexual orientation or gender identity. Everyone deserves access to medically necessary care and should never be turned away because of who they are or who they love.”