The Obama administration will issue a sweeping decree on Friday telling every U.S. public school district to allow transgender students to use the bathrooms that match 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 which 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," U.S. 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.

READ: North Carolina officials sue Justice Dept over bathroom law

"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 Obama administration 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.

Americans are divided over how public restrooms should be used by transgender people, according to a Reuters/Ipsos poll, with 44 percent saying people should use them according to their biological sex and 39 percent saying they should be used according to the gender with which they identify.