A new Brazilian law allows Jewish and non-Jewish students to skip school exams and classes for religious reasons.

They will be able to be absent on any date in which, according to their religious precepts, the exercise of activities is prohibited, according to the legislation. For Jewish students, it means Shabbat and holidays such as Passover, Rosh Hashanah and Yom Kippur.

“It’s a legitimate demand from the part of the Brazilian population that keeps the Sabbath. It is yet another important victory for the Jewish community and all those involved in this struggle, including the Adventists,” Fernando Lottenberg, president of the Brazilian Israelite Confederation, told the JTA on Monday.

Effective in 60 days, the law was signed Thursday by Brazil’s new president Jair Bolsonaro, a right-wing non-Jewish politician who is ardently pro-Israel and a friend of the Jewish community.

Absences must be requested in advance and missed exams and classes must be provided on an alternative date or replaced by written assignments or research activities, according to the law.

In 2016, some 76,000 Sabbath-observant applicants of Brazil’s annual national high school exam were confined to classrooms between 1 p.m. to 7 p.m. on Saturday in order to start the test after sunset without the possibility of cheating.

In 2017, the exam was moved from Saturday and administered on two different Sundays, after a long-running campaign by Jewish groups and members of other religions.