The Minnesota State High School League has agreed to a legal settlement that will allow boys to compete on high school dance teams beginning next school year.

The Star Tribune says the settlement comes after a ruling last month by a federal appeals court that it must allow two high school boys in Roseville and Hopkins to be a part of their schools’ competitive dance teams.

Juniors Dmitri Moua and Zachary Greenwald sued last July saying the league’s girls-only bylaws violate a federal law that bars sex discrimination in education programs that receive federal funds. A federal judge denied the request, but the 8th U.S. Circuit Court of Appeals last month reversed the judge’s ruling and remanded the case to the lower court to issue the boys’ injunction.