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: Michigan Matters: EV's Supercharging Impact Across 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: Son Fatally Shoots Mother While Driving On Woodward Near Royal Oak

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: Wixom Man Charged In Shooting Death Of Father's Ex-Girlfriend

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