Yale University has sued the state of Connecticut over rules it says limit the number of gender-neutral bathrooms it can designate on campus, the latest skirmish in the broader U.S. fight about gender identity.

The Ivy League school said in the lawsuit it wants to designate all single-occupant restrooms at its law school as gender neutral, but the plan would run afoul of the state building code, which does not count gender-neutral bathrooms when it assesses whether a public building has enough toilets.

Students walk on the campus of Yale University in New Haven, Connecticut on October 7, 2009. Shannon Stapleton / Reuters

The suit was filed on Friday in Connecticut Superior Court in New Haven, after the university received complaints from law school students. Yale has asked the state to drop requirements that single-user restrooms have an assigned gender label.

Restrooms have become a flashpoint in the fight over transgender rights, following North Carolina passed a law last year requiring people to use public restrooms that corresponded with their birth gender. The measure was partially repealed in March after the state lost hundreds of millions of dollars from economic boycotts.

Texas lawmakers are expected to consider a similar measure next month. Proponents of the bathroom bills say they aim to protect individual privacy. That is not a factor in the Yale case, which focuses on single-occupant restrooms.

"The proposed shift in designation to gender neutral .... would facilitate quick access to a bathroom within the building for persons of all gender identities," the 315-year-old university wrote in the lawsuit.

The state code would require Yale to build more bathrooms to be in compliance with rules about the number of restrooms for men and women. The school said it would be impractical and unnecessary in its century-old law school building.

A spokesman for Connecticut Governor Dannel Malloy, a Democrat, did not immediately respond to a request for comment, and officials from the state Codes and Standards Committee, which oversees the rules, were not immediately available.

The suit asks the court to order the state to allow Yale to count gender-neutral single-user bathrooms toward state requirements and order the state to modify the rules to allow gender-neutral bathrooms to count for code compliance in all cases.

Follow NBC Out on Twitter, Facebook and Instagram