As California’s new law requiring almost all children entering day care, kindergarten or 7th grade to be vaccinated against various diseases took effect Friday, opponents filed a federal lawsuit seeking to have the law overturned.

The suit, filed by six parents and four advocacy groups in U.S. District Court in San Diego, argues that the law violates the California Constitution’s guarantee of a public education for all children. It also claims the law violates the rights to, among other things, equal protection and due process guaranteed by the U.S. Constitution.

The law "has made second-class citizens out of children who for very compelling reasons are not vaccinated according to the [Centers for Disease Control and Prevention] schedule," said plaintiffs’ attorney Robert Moxley.

The plaintiffs are seeking a temporary restraining order blocking the law’s implementation while the case is adjudicated.

The suit names the California Department of Public Health and the California Department of Education as defendants. A Public Health spokeswoman said her agency has no comment at this time. Officials at the Department of Education were unavailable for comment.

Gov. Jerry Brown signed the legislation into law one year ago. Under the measure, parents can no longer cite their personal beliefs as a reason not to vaccinate their children. The law does allow for medical exemptions.

State Senators Richard Pan (D-Sacramento) and Ben Allen (D-Santa Monica) introduced SB 277 last year following the measles outbreak that began in Dec. 2014 at the Disney theme parks in Anaheim.

Public health officials said a significant number of those who caught the measles in the outbreak were unvaccinated.

The bill's authors said it was necessary to advance the effort to achieve herd immunity throughout the state. Herd immunity refers to the achievement of a high enough level of vaccination in a population to protect everyone, including those who cannot be immunized for medical reasons.

From a statewide perspective, California has achieved herd immunity, but there are pockets of resistance to vaccination — in some rural and wealthy enclaves — that have left certain communities well short of that goal.

The legislation touched off an intense political battle in Sacramento. People opposed to all vaccinations joined forces with those who wanted the flexibility to moderate the recommended vaccination schedule to fight the bill. Hundreds of parents crowded into committee hearings and held rallies in the Capitol.

In response to arguments that some parents who would want to opt out of vaccinating their kids might not be able to afford to home-school them, Pan amended the bill to allow those who opt out of vaccination to set up multiple-family home schools, and to home-school their children using a public school independent study program.

The law grandfathers in children who were already enrolled in day care or school with a personal belief exemption. So for example, if a child whose parents obtained a personal belief exemption is now in 1st grade, he will not need to get up to date on his vaccinations until he enters 7th grade.