AUGUSTA, Maine — A bill seeking to end Maine's religious and philosophical exemptions to vaccines was signed Friday by Gov. Janet Mills.

LD 798 eliminates religious and philosophical exemptions for receiving the immunizations required by schools and day cares.

RELATED: Vaccine bill passes Senate, but opponents say fight isn't over
RELATED: Bill to end personal vaccine opt-outs heads to governor

Gov. Mills' office says the bill will improve immunization rates in schools. This as health officials say Maine's exemption rates are rising, endangering children who can't be vaccinated for medical reasons.

Under the new law, the governor's office says students currently enrolled in schools who do not have their required immunizations will have until 2021 to receive their vaccinations.

Immunization exemptions on a medical basis, applying to students from elementary to postsecondary, as well as employees of nursery schools and health care facilities, are currently and will remain protected under law.

The law will go into effect 90 days after the Legislature adjourns.

The Associated Press contributed to this report