KALAMAZOO, Mich. (AP) — Western Michigan University agreed to stop opposing a legal challenge by athletes who declined to get a COVID-19 vaccine, attorneys said Tuesday.

After two courtroom losses, WMU settled the dispute by allowing athletes to play their sport while also undergoing regular testing for the virus and wearing masks when appropriate, according to a court filing.

READ MORE: Annual 'Menorah In The D' Event Kicks Off In Metro Detroit

Those were the terms of an injunction ordered in September by a federal judge and affirmed in October by an appeals court.

“The university wishes the student-athletes well in their academic and athletic careers, and the student-athletes are excited to continue their academic and athletic careers,” the university and the Great Lakes Justice Center said in a statement.

WMU began the fall season by requiring athletes to be vaccinated against COVID-19. At least 16, mostly women, sought an exemption on religious grounds but were turned down.

READ MORE: Porch Pirates: Tips On Keeping Packages Safe From Thieves This Holiday Season

WMU had argued in court that its vaccination policy was neutral toward religion. The school said athletes who sought a religious exemption were still members of a team and could keep their scholarship.

Outside the athletic department, COVID-19 vaccinations are encouraged but not required for WMU students and staff.

WMU will pay $34,000 in legal fees as part of the settlement, attorney David Kallman said.

MORE NEWS: Two Arrested In Connection To Senior Sexual Assault Case

© 2021 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.