A school’s obligation under federal law “to ensure nondiscrimination on the basis of sex requires schools to provide transgender students equal access to educational programs and activities even in circumstances in which other students, parents, or community members raise objections or concerns,” the letter states. “As is consistently recognized in civil rights cases, the desire to accommodate others’ discomfort cannot justify a policy that singles out and disadvantages a particular class of students.”

As soon as a child’s parent or legal guardian asserts a gender identity for the student that “differs from previous representations or records,” the letter says, the child is to be treated accordingly — without any requirement for a medical diagnosis or birth certificate to be produced. It says that schools may — but are not required to — provide other restroom and locker room options to students who seek “additional privacy” for whatever reason.

Attached to the letter, the Obama administration will include a 25-page document describing “emerging practices” that are in place in many schools around the country. Those included installing privacy curtains or allowing students to change in bathroom stalls.

In a blog post accompanying the letter, senior officials at the Justice and Education Departments said they issued it in response to a growing chorus of inquiries from educators, parents and students across the country, including from the National Association of Secondary School Principals, to clarify their obligations and “best practices” for the treatment of transgender students.

“Schools want to do right by all of their students and have looked to us to provide clarity on steps they can take to ensure that every student is comfortable at their school, is in an environment free of discrimination, and has an opportunity to thrive,” wrote Catherine E. Lhamon, the assistant secretary of education for civil rights, and Vanita Gupta, the head of the Justice Department’s Civil Rights Division.

Thomas Aberli, a high school principal in Louisville, Ky., said the new guidance would help administrators across the country who are trying to determine the best way to establish safe and inclusive schools. He said his school had little to work with when it drafted a policy that was put in place last year.