Gay rights advocates are cheering the Supreme Court's Thursday ruling upholding the Patient Protection and Affordable Care Act.

In a 5-4 decision, the court ruled that the law's individual mandate, which requires most Americans to buy health insurance, is constitutional.

President Barack Obama called the ruling a “victory for people all over this country whose lives will be more secure because of this law and the Supreme Court's decision to uphold it.”

The National Center for Lesbian Rights (NCLR) applauded the court's decision, saying the law would “have an enormous impact on access to high quality care for lesbian, gay, bisexual and transgender (LGBT) people and their families.”

“The ACA represents the largest reform to the healthcare system in over 40 years, and the most significant effort ever undertaken to address health disparities for LGBT patients seeking care. The law makes a number of changes designed to increase access to care. These changes, such as covering preventative care and setting a new national threshold for Medicaid eligibility, make it substantially easier for low-income people and people with pre-existing conditions to access care, issues that are crucially important for the LGBT community.”

The group noted that the ACA also prioritizes issues that are crucial to LGBT people, including granting the Department of Health and Human Services (HHS) the authority to collect demographic data for the purpose of targeting health disparities in certain communities.

The ruling will “enable the federal government to begin addressing the shameful disparities that lesbian, gay, bisexual and transgender people face in gaining access to healthcare,” NCLR Executive Director Kate Kendell said in a statement.

Groups representing people living with HIV also cheered the Supreme Court's ruling.

“Tens of thousands of people living with HIV will now have greater access to prevention, treatment and care, including life saving drugs,” said Victor Barnes, interim president and CEO of AIDS United.

“Other important provisions that benefit people living with HIV/AIDS include rules that prohibit insurers from denying coverage to people living with HIV or other pre-existing conditions, and setting annual and lifetime caps on the dollar value of insurance coverage.”

“The end of HIV in the United States is in our sight,” he added. “The Supreme Court's ruling upholds the ACA's pivotal provisions that keep us on the course that has been outlined by the first-ever National HIV/AIDS Strategy and by the significant treatment and prevention advances that we've seen over the last year.”