NEW YORK (Reuters) - A U.S. appeals court on Tuesday affirmed a lower court’s preliminary ruling that a transgender boy must be allowed to use the boys’ bathrooms at his high school in Kenosha, Wisconsin.

Lawyers for Ashton Whitaker, 17, the student behind the lawsuit, praised the decision by the 7th U.S. Circuit Court of Appeals as the first instance of a federal appellate court ruling that transgender students are protected under laws that ban discrimination in education.

Whitaker’s family sued the Kenosha Unified School District last year over its decision to forbid him from using the boys’ restrooms at George Nelson Tremper High School because his birth certificate designates him as female.

It is one of a string of legal battles on behalf of transgender people across the United States over the use of bathrooms in schools and public buildings, which has become a divisive political issue.

A unanimous three-judge panel of the 7th Circuit Court in Chicago said in its ruling that it agreed with a district court in Wisconsin that Whitaker was likely to face “irreparable harm” if banned from the boys’ bathrooms.

The panel also ruled that Whitaker would likely win his claim, which continues in the lower court, that the anti-discrimination law known as Title IX of the Education Amendments of 1972 protects transgender students.

Ronald Stadler, a lawyer for the school district, criticized the 7th Circuit’s position on Title IX, faulting the court in a statement as having “created a new right extending discrimination because of sex to now include the status of being transgender.”

The ruling was dismissive of the school district’s argument that allowing Whitaker to use the boys’ bathrooms might infringe the privacy rights of other students.

“A transgender student’s presence in the restroom provides no more of a risk to other students’ privacy rights than the presence of an overly curious student of the same biological sex who decides to sneak glances at his or her classmates,” Judge Ann Claire Williams wrote in the ruling.

Before the lawsuit, the school district said Whitaker, who will graduate from the school this week, would have to use the girls’ bathrooms or a “gender-neutral” bathroom in the school’s main office. Whitaker would be the only student allowed access to that facility.

Whitaker argued that arrangement drew uncomfortable attention to his being transgender. He resorted to drinking less water, which caused him to faint when dehydrated, according to court filings. He told the court he contemplated suicide.

“It’s nice knowing this will definitely be a beacon for other trans kids and other members of the community to look to as a source for hope,” Whitaker said in a conference call with reporters on Tuesday.