CAMBRIDGE, Mass. — Several national fraternities and sororities sued Harvard University on Monday over a 2016 rule that discourages students from joining single-gender social clubs, marking the first legal challenge to the school's policy.

Two fraternities and two sororities filed a lawsuit in Boston's federal court, while another sorority separately sued the school in Massachusetts state court. Both cases argue that the school's policy discriminates against students based on their sex and spreads negative stereotypes about students who join all-male or all-female organizations.

SIGN UP FOR BREAKING ALERTS FROM NBC NEWS

Harvard officials did not immediately provide comment on the suits.

Starting with last year's freshman class, Harvard students who are members of single-gender clubs are barred from leading campus groups or becoming captains of sports teams. The school also refuses to endorse the students for prestigious fellowships, including the Rhodes and Marshall scholarships.

Harvard officials crafted the rule to curb secretive all-male groups known as "final clubs," whose members include some former U.S. presidents but have faced mounting criticism from the university. A 2016 report by the school accused the clubs of having "deeply misogynistic attitudes" and tied them to problems with sexual assaults.

But the rule also applies to a variety of other groups, including fraternities, sororities and even single-gender musical groups. Since the rule took effect last year, at least three sororities have cut ties with their national organizations and reopened as co-ed groups.

Harvard does not officially recognize any fraternities or sororities, but several have been available to Harvard students in the past, often with houses located near campus in Cambridge, Massachusetts.

The sororities suing Harvard in federal court are Kappa Alpha Theta and Kappa Kappa Gamma, whose local chapters disbanded and said they would become co-ed groups. The two fraternities in the federal suit, Sigma Chi and Sigma Alpha Epsilon, say they have struggled to recruit students and have faced financial difficulty with fewer dues-paying members.

"The common thread that ties together all of Harvard's ever-shifting justifications for the sanctions policy is sexism," the suit says. "Harvard's views that all-male organizations cause sexual assault because they are all-male, and that there is no value to all-female or all-male organizations, are sexist in the extreme."

Also suing Harvard in the federal case are two anonymous male students who say they have been unfairly denied campus leadership roles because of the rule, and another who is not subject to the policy because he's an upperclassmen but says he has faced negative stigma created by the rule.

The federal suit says Harvard's rule violates the 1972 law known as Title IX, which forbids discrimination based on sex in schools that receive federal funding. The suit says Harvard's policy singles out women and men for punishment because of their sex, and relies on stereotypes about men and women.

According to the suit, Harvard doesn't place other limits on the types of groups students can join, arguing that students could "join the American Nazi Party, or could create an off-campus undergraduate chapter of the Ku Klux Klan" without violating school policy.

The lawsuit filed in state court similarly argues that the rule violates civil rights laws in Massachusetts. That case was filed by the Alpha Phi sorority and its Harvard chapter, along with the Delta Gamma Fraternity Management Corporation, an Ohio-based group that supports the Delta Gamma sorority, whose local chapter shut down in August.

The Delta Gamma Fraternity Management Corporation says it expects to lose $25,000 in revenue over the closure, and it says it's stuck paying another $25,000 for the local chapter's house in Cambridge, which is now sitting idle.

Both suits demand a jury trial and ask the courts to stop Harvard from enforcing the policy.