Virginia’s attorney general says the state’s colleges and universities can require students to get the COVID-19 vaccine before being allowed to attend in-person classes and activities.

The advisory opinion released Monday by Attorney General Mark Herring came in response to a request from Del. Mark Keam, a Democrat from Fairfax County.

Herring noted in his opinion that there is no federal law prohibiting Virginia colleges and universities from imposing a vaccine requirement. He also said the boards of visitors of Virginia’s institutions of higher education have been granted broad authority by the General Assembly to implement policies and regulations to protect the safety and welfare of students.

At the same time, Herring warned that imposing a vaccine requirement is “not without complications,” and that schools should be prepared to make accommodations for medical and religious reasons.

Last week, University of Maryland System officials announced that students, faculty and staff returning to campuses in the fall must be vaccinated but that the system will allow exemptions for medical or religious reasons.

The UMS system includes 12 universities and three regional higher education centers serving about 135,000 undergraduate and about 41,000 graduate students.

Maryland’s announcement came one day after the University of California system and the California State University system said they intend to require vaccines in the fall.