The U.S. Supreme Court ruled this morning that Title VII of the landmark 1964 Civil Rights Act protects gay and transgender workers from workplace discrimination. With a solid 6-3 majority, the court ruled that Title VII, which made it illegal for employers to discriminate based on race, religion, national origin, and sex, also covers gay and transgender workers.

Monday's ruling came in response to three cases in which employers argued that the term sex, as used in the Civil Rights Act, was not intended to cover gay or transgender people. In joining the case alongside the employers, the Justice Department argued that it was up to Congress to pass legislation explicitly mandating protections covering sexual orientation and gender identity.

Chief Justice John Roberts Jr. and Justices Neil Gorsuch, Ruth Bader Ginsburg, Stephen Breyer, Sonia Sotomayor and Elena Kagan disagreed.

"Today, we must decide whether an employer can fire someone simply for being homosexual or transgender,” Justice Gorsuch wrote for the majority. “The answer is clear. An employer who fires an individual for being homosexual or transgender fires that person for traits or actions it would not have questioned in members of a different sex. Sex plays a necessary and undisguisable role in the decision, exactly what Title VII forbids.

“Those who adopted the Civil Rights Act might not have anticipated their work would lead to this particular result. Likely, they weren’t thinking about many of the act’s consequences that have become apparent over the years, including its prohibition against discrimination on the basis of motherhood or its ban on the sexual harassment of male employees. But the limits of the drafters’ imagination supply no reason to ignore the law’s demands.”

In a lengthy dissent, Justice Samuel Alito wrote, "There is only one word for what the court has done today: legislation. The document that the Court releases is in the form of a judicial opinion interpreting a statute, but that is deceptive." Justice Clarence Thomas joined Alito in his dissent.

In a separate dissent, Justice Brett Kavanaugh also said there were arguments to be made for rewriting Title VII to protect discrimination on the basis of sexual orientation, but that was the job of Congress.

"When this court usurps the role of Congress, as it does today, the public understandably becomes confused about who the policymakers really are in our system of separated powers and inevitably becomes cynical about the oft-repeated aspiration that judges base their decisions on law rather than on personal preference," Kavanaugh argued.

James Esseks, director of the ACLU’s LGBTQ & HIV Project, said in a statement, “This is a huge victory for LGBTQ equality. Over 50 years ago, Black and Brown trans women, drag queens, and butch lesbians fought back against police brutality and discrimination that too many LGBTQ people still face. The Supreme Court’s clarification that it’s unlawful to fire people because they’re LGBTQ is the result of decades of advocates fighting for our rights. The court has caught up to the majority of our country, which already knows that discriminating against LGBTQ people is both unfair and against the law.”

On Monday, the Supreme Court also announced that it would not hear an appeal from the Trump administration attempting to challenge a California “sanctuary law.” In keeping with tradition, no explanation was given, but Justices Thomas and Alito said they would have heard the case. In another unsigned order, the court refused "to reexamine the much-criticized, modern-day legal doctrine created by judges that has shielded police and other government officials from lawsuits over their conduct," NPR reports.