The Obama administration will issue a sweeping decree Friday telling every US public school district to allow transgender students to use the bathroom that matches their gender identity.

The letter, signed by officials from the Education and Justice departments, does not have the force of law but contains an implicit threat that schools that do not abide by the Obama administration’s interpretation of the law could face lawsuits or a loss of federal aid.

“There is no room in our schools for discrimination of any kind, including discrimination against transgender students on the basis of their sex,” US Attorney General Loretta Lynch said in a statement.

“This guidance gives administrators, teachers, and parents the tools they need to protect transgender students from peer harassment and to identify and address unjust school policies,” she said.

The move comes as the Obama administration and North Carolina battle in federal court over a state law passed in March that limits public bathroom access for transgender people.

By passing the law, North Carolina became the first state in the country to ban people from using multiple-occupancy restrooms or changing rooms in public buildings and schools that do not match the sex on their birth certificate.

“No student should ever have to go through the experience of feeling unwelcome at school or on a college campus,” Education Secretary John King Jr. said in a statement.

“We must ensure that our young people know that whoever they are or wherever they come from, they have the opportunity to get a great education in an environment free from discrimination, harassment and violence,” he said.

The administration’s letter will say schools may not require transgender students to have a medical diagnosis, undergo any medical treatment, or produce a birth certificate or other document before treating them according to their gender identity.