A federal judge dismissed a case Wednesday that would have prohibited transgender students in Dallas, Ore., from using the bathroom and locker room that aligns with their gender identity.

The lawsuit—which was filed last November by the groups "Parents for Privacy" and "Parents Rights in Education"—sought to overturn existing school district guidelines that protect students from discrimination.

Among the eight claims listed in the plaintiff's lawsuit were that the school district—located 60 miles south of Portland—violated rights to the First Amendment freedom to exercise religion, privacy rights and parents' rights to "direct the education and upbringing of their children."

Federal judge Marco Hernandez dismissed the groups' complaints, citing Oregon laws that protect students against discrimination as well as other similar lawsuits that have been tossed out across the country.

The school district was following the guidance from the state. In 2017, in response to President Donald Trump's decision to withdraw federal rules protecting transgender students, Gov. Kate Brown and the Oregon Department of Education published updated guidelines which explicitly ban public schools from gender discrimination, "regardless of whether the individual's gender identity, appearance, expression or behavior differs from that traditionally associated with the individual's sex at birth."

Brook Shelley, board chair at Basic Rights Oregon, the LGBTQ advocacy group that challenged the case, celebrated the legal victory. "We are thrilled with the judge's decision," Shelley said in a statement. "It sends a clear message to school districts that transgender students deserve the same access to a safe and affirming education as every other student."

The court decision doesn't completely settle the matter of transgender students facing discrimination in Oregon schools.

Mat dos Santos, legal director at the ACLU of Oregon, which joined the case on behalf of Basic Rights Oregon, says the group is preparing to fight a similar lawsuit filed recently in Sutherlin, Ore.

In May, the ACLU of Oregon also took on a case at a school in Oregon's coastal Coos County, in which LGBTQ students of North Bend alleged numerous instances of harassment and discrimination. The school's principal and school resource officer were removed from their positions in the district's settlement with ACLU.

"We will continue to defend transgender students in Oregon from these harmful lawsuits," dos Santos said in a statement. "We know that when transgender youth are allowed to show up as their true selves, they thrive and make meaningful contributions to the community. This makes schools better for everyone."