SALEM, Ore. (AP) — A federal appeals court on Wednesday supported a lower court's dismissal of a lawsuit against an Oregon school district's policy that allows transgender students to use locker rooms and bathrooms of the gender they identify with instead of their birth sex.

Some parents and students at a high school in Dallas, Oregon, had filed the lawsuit in 2017, saying the policy caused embarrassment and stress.

“We hold that Dallas School District No. 2’s carefully-crafted Student Safety Plan seeks to avoid discrimination and ensure the safety and well-being of transgender students,” the Ninth Circuit Court of Appeals said.

The appeals court said the district's policy does not violate students' constitutional rights or a law that protects people from discrimination based on sex in education programs.

Similar lawsuits have been dismissed by courts in other parts of the country.

The ACLU, ACLU of Oregon, and Lane Powell represented Basic Rights Oregon in the case to defend the Dallas School District.

The district "has done the right thing all along, following the law that allows transgender students the right to use the bathroom or locker room that most closely aligns with their gender identity," said Nancy Haque, executive director of Basic Rights Oregon. "This simple act provides a more supportive and affirming learning environment.”

About 15,000 people live in Dallas, a town in an agricultural area 15 miles (24 kilometers) west of Salem, the state capital.

———

Follow Andrew Selsky on Twitter at https://twitter.com/andrewselsky

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.