A gender-neutral sign is seen outside a restroom in Durham, N.C., on May 11, 2016. Transgender students in Maryland and Wisconsin have sued local school officials for the right to use restrooms that match their gender identities. (Sara D. Davis/Getty Images)

Transgender high school students in Maryland and Wisconsin who were banned from boys’ facilities in their schools have filed federal lawsuits arguing that the prohibitions violate their civil rights.

The two lawsuits — filed by transgender boys from Talbot County, Md., and Kenosha, Wis. — are the latest actions in a flurry of litigation surrounding the question of how schools treat transgender students. The cases challenge the legality of restricting transgender students to unisex restrooms or to the restrooms that correspond with the sex shown on their birth certificates rather than allowing them access to the public-school bathrooms — and locker rooms — that match their gender identity.

The U.S. Court of Appeals for the 4th Circuit, which includes Maryland, in April sided with a transgender boy from Virginia who sued his school board after it banned him from the boys’ restroom at his high school. The court ruled that his lawsuit could move forward and deferred to the Obama administration’s position that such prohibitions are a violation of Title IX, which bars sex discrimination in public schools.

In May, the administration directed the nation’s public schools to accommodate transgender students by allowing them to use restrooms and locker rooms that align with their gender identities. The guidance sparked an immediate backlash: 21 states have sued to overturn it, alleging an overreach by the administration.

Attorneys for the Maryland student, a 14-year-old from Talbot County identified as M.A.B. in the filing to protect his identity, said in the complaint that he has been barred from using the boys’ locker room at St. Michaels Middle High, a public school in the Eastern Shore town of St. Michaels. This meant that he often was late to physical education class because he had to use a unisex restroom to change, according to the filing.

Jer Welter, a lawyer with FreeState Justice, a group that is representing the student, said the school opened the boys’ restroom to the student only at the end of the school year after lawyers informed the school of the 4th Circuit ruling in the Virginia case.

“It was both difficult for him in that it has been stigmatizing and also just practically difficult in a way that other students have not had to deal with,” Welter said. “It’s just important that he have equal access as other students do to the same facilities. It’s important to his mental well-being and his dignity at school so he’s not branded as different from other boys.”

The lawsuit alleges that school officials are violating Title IX by keeping the transgender student from using the boys’ restrooms. School system officials did not immediately respond to a request for comment Tuesday.

In Wisconsin, a 16-year-old rising high school senior accused Kenosha Unified School District No. 1 of violating his civil rights by refusing to treat him as a boy, including by requiring him to use the girls’ restroom or single-occupancy restrooms, directing security guards to monitor his restroom usage, and repeatedly using his birth name and female pronouns to refer to him.

His lawyers have identified him as Ash Whitaker, a student at Kenosha’s Tremper High School who made national headlines in April when his school told him he could not run for prom king but instead had to run for prom queen. After 70 students staged a sit-in to support him, the district reversed course, according to the complaint.

Ash used the boys’ restroom without incident for seven months until February, when a teacher notified administrators and he was told to use girls’ restrooms or single-occupancy restrooms in the school’s office. Ash then limited his liquid intake and tried not to use the restroom at all, which caused medical problems, according to the complaint. But when he needed a restroom, he used the boys’ room and continued to assert his right to do so, having read about the U.S. Justice Department’s defense of transgender students’ restroom access.

The complaint also alleges that the district required him to room with girls during a trip to Europe with the school orchestra, even though he felt uncomfortable doing so. And the lawsuit said that the district has instructed school staffers to issue bright green wristbands to Ash and other transgender students, a move that Ash’s lawyers wrote would single out transgender students for “additional scrutiny, stigma, and potentially harassment or violence, and violate their privacy.”

The Kenosha school district did not immediately respond to a request for comment Tuesday.

Kenosha’s school board is contemplating policy revisions that would explicitly protect transgender students’ privacy and would prohibit bullying and harassment of transgender students, according to documents posted on the district’s website. The proposed revisions also include a new policy on restroom access that Ash’s lawyers say does not go far enough: It presumes that students will use restrooms that match their biological sex and said that students who feel uncomfortable doing so should contact school staffers, who will decide how to proceed on a case-by-case basis.

The legal wrangling over the issue has led to confusion for school officials, some of whom have struggled to determine how best to protect transgender students.

Virginia’s Fairfax County School Board on Monday decided to halt plans to implement new rules that spell out to teachers and administrators how to accommodate transgender students, saying that it is seeking greater legal clarity before moving forward.

Among their provisions, the rules, which were to take effect at the start of this school year, would have directed schools to allow transgender students to use restrooms matching their gender identity.

“The Board determined it needs additional time to evaluate the legal issues surrounding the regulation, including a case now pending before the Supreme Court on this topic from a Virginia school district, ” it said in a news release.