A federal appeals court has ruled that a New Jersey condominium association violated women's rights by setting separate swimming hours for male and female residents.

The 3rd U.S. Circuit Court of Appeals said the schedule adopted by A Country Place's condominium association was "plainly unequal in its allotment of favorable swimming times."

The Lakewood condominium complex, which serves people 55 or older, restricts swimming by gender at certain times in accord with Jewish law that prohibits men and women from bathing together. Orthodox Jewish residents made up about two thirds of residents, but several non-Orthodox homeowners sued in 2016 after being fined $50 each after refusing to abide by the rules.

A judge ruled in January that the separate swim hours weren't discriminatory because they applied to both sexes equally, but the appeals court overturned that decision Monday.

Under the rules, men and women were only allowed in the pool together for two hours on weekdays and all day Saturday, when, the court noted, "Orthodox residents would not go swimming on the Jewish Sabbath."

The association said it allocated roughly the same number of hours for men and women, but the court said women were only able to swim for about 3½ hours on weeknight evenings compared to 16½ hours for men.

"Women with regular-hour jobs thus have little access to the pool during the work week, and the schedule appears to reflect particular assumptions about the roles of men and women," Judge Thomas Ambro wrote for the court majority.

An attorney for the plaintiffs, Jose Roman, told the Asbury Park Press that his clients were "very happy that the court saw the case our way, that it was discriminatory based on gender." An attorney for the condominium association didn't immediately return an email seeking comment.