In this Wednesday, Sept. 16, 2020, file photo, kindergarten students wear masks as they are led into Lee Elementary School, in Lee, Mass. Credit: Stephanie Zollshan / The Berkshire Eagle via AP

BOSTON — Massachusetts Education Commissioner Jeff Riley issued new regulations Wednesday requiring all public school students ages 5 and above, and all staffers, to wear masks indoors while at school.

All visitors are also expected to wear masks in school buildings. Masks are not required when outdoors.

The regulations take effect immediately and come a day after the state Board of Elementary and Secondary Education gave Riley the authority to issue a mask mandate for K-12 public schools.

The requirement will remain in place until at least Oct. 1 and could be revised in light of new public health data.

State education officials are strongly recommending students younger than 5 also wear masks in school. Students and staff who cannot wear a mask for medical reasons, and students who cannot wear a mask for behavioral reasons, are exempted.

The mask requirement applies when students and staff are indoors, except when eating or drinking, or during mask breaks. Mask breaks should happen when windows are open or students are outdoors, with meals and outdoor recess providing built-in mask breaks.

Under the new regulations, masks may also be removed indoors to participate in some activities, such as the use of wind instruments in band, although schools are urged to consider using “instrument masks” or holding those classes outdoors.

Masks are also required for student-athletes and coaches when indoors, under guidance from the Massachusetts Interscholastic Athletic Association.

Although students are responsible for bringing their own masks, disposable masks should be made available by the school for students who need them. By federal public health order, all students and staff are also required to wear masks on school buses.

Whether to discipline a student for failing to wear a mask is a decision left to local school districts, although the state is urging local education officials to look for alternatives before resorting to disciplinary action.

After Oct. 1, if a school demonstrates a vaccination rate of 80 percent or more for students and staff, then vaccinated individuals in that school would no longer be subject to the mask requirement.

The mandate marks a shift for Gov. Charlie Baker’s administration, which had previously left face covering decisions up to individual districts. It also comes as the delta variant of the coronavirus continues to drive up case counts around the state.

The Massachusetts Teachers Association has also welcomed the mask requirement.