At two public charter schools in the Sonoma wine country town of Sebastopol, more than half the kindergartners received medical exemptions from state-required vaccines last school year. The cities of Berkeley, Santa Cruz, Nevada City, Arcata, and Sausalito all had schools in which more than 30 percent of the kindergartners had been granted such medical exemptions.

Nearly three years ago, with infectious disease rates ticking up, California enacted a fiercely contested law barring parents from citing personal or religious beliefs to avoid vaccinating their children. Children could be exempted only on medical grounds, if the shots were harmful to health.

Yet today, many of the schools that had the highest rates of unvaccinated students before the new measure continue to hold that alarming distinction. That’s because parents have found end runs around the new law requiring vaccinations. And they have done so, often, with the cooperation of doctors—some not even pediatricians. One prolific exemption provider is a psychiatrist who runs an anti-aging clinic.

Doctors in California have broad authority to grant medical exemptions to vaccination, and to decide the grounds for doing so. Some are wielding that power liberally and sometimes for cash: signing dozens—even hundreds—of exemptions for children in far-off communities.

“It’s sort of the Hail Mary of the vaccine refusers who are trying to circumvent SB 277,” the California Senate bill signed into law by Governor Jerry Brown in 2015, says Brian Prystowsky, a Santa Rosa pediatrician. “It’s really scary stuff. We have pockets in our community that are just waiting for measles to rip through their schools.”

The number of California children granted medical exemptions from vaccinations has tripled in the past two years.

Across the nation, 2019 is shaping up to be one of the worst years for US measles cases in a quarter-century, with major outbreaks in New York, Texas, and Washington state, and new cases reported in 12 more states, including California. California’s experience underlines how hard it is to get parents to comply with vaccination laws meant to protect public safety when a small but adamant population of families and physicians seems determined to resist.

When Senate Bill 277 took effect in 2016, California became the third state, after Mississippi and West Virginia, to ban vaccine exemptions based on personal or religious beliefs for public and private school students. (The ban does not apply to students who are home-schooled.)

In the two subsequent years, SB 277 improved overall child vaccination rates: The percentage of fully vaccinated kindergartners rose from 92.9 percent in the 2015-16 school year to 95.1 percent in 2017-18.

But those gains stalled last year due to the dramatic rise in medical exemptions: More than 4,000 kindergartners received these exemptions in the 2017-18 school year. Though the number is still relatively small, many are concentrated in a handful of schools, leaving those classrooms extremely vulnerable to serious outbreaks.

Watch More From Vice News:

Based on widely accepted federal guidelines, vaccine exemptions for medical reasons should be exceedingly rare. They’re typically reserved for children who are allergic to vaccine components, who have had a previous reaction to a vaccine, or whose immune systems are compromised, including kids being treated for cancer. Run-of-the-mill allergies and asthma aren’t reasons to delay or avoid vaccines, according to the US Centers for Disease Control and Prevention. Neither is autism or fear of autism.

Before California’s immunization law took effect, just a fraction of 1 percent of the state’s schoolchildren had medical exemptions. By last school year, 105 schools, scattered across the state, reported that 10 percent or more of their kindergartners had been granted medical exemptions. In 31 of those schools, 20 percent or more of the kindergartners had medical exemptions.

The spike in medical exemptions is taking place amid a politically tinged, often rancorous national conversation over vaccines and personal liberty as measles resurges in the U.S. and worldwide. At least 387 cases of measles had been reported nationwide through March 28, according to the CDC. In California, 16 cases had been reported, two of them requiring hospitalization.

The problem in California, state officials say, is how the immunization law was structured. It removed the ability of parents to cite “personal belief” as a reason for exempting their children from vaccine requirements in day care and schools. Exemptions now must be authorized by a licensed physician who provides a written statement citing a medical condition that indicates immunization “is not considered safe.”

But the law does not specify the conditions that qualify a student for a medical exemption, nor does it require physicians to follow federal guidelines.

The wording has led to a kind of gray market in which parents share names of “vaccine-friendly” doctors by word of mouth or in closed Facebook groups. And some of those doctors are granting children blanket exemptions—for all time and all vaccines—citing a range of conditions not supported by federal guidelines, such as a family history of eczema or arthritis.

Amid growing concerns about suspect exemptions, the California Department of Public Health recently launched a review of schools with “biologically unlikely” numbers of medical exemptions, says the agency’s director, Karen Smith. Doctors who have written questionable exemptions will be referred to the Medical Board of California for possible investigation.

The medical board, which licenses doctors, has the authority to levy sanctions if physicians have not followed standard medical practice in examining patients or documenting specific reasons for an exemption.

In recent years, however, the board has sanctioned only one doctor for inappropriately writing a medical vaccine exemption in a case that made headlines. Since 2013, the board has received 106 complaints about potentially improper vaccine exemptions, including nine so far this year, says spokesman Carlos Villatoro.

One pending case involves Ron Kennedy, who was trained as a psychiatrist and now runs an anti-aging clinic in Santa Rosa.

Medical board investigators took the unusual step of subpoenaing 12 school districts for student medical records after receiving complaints that Kennedy was writing inappropriate exemptions. They found that Kennedy had written at least 50 exemptions, using nearly identical form letters, for students in multiple communities, including Santa Rosa, Fremont, and Fort Bragg, saying that immunizations were “contraindicated” for a catchall list of conditions including lupus, learning disability, food allergies and “detoxification impairment.”

Dean Blumberg, chief of pediatric infectious diseases at UC Davis Children’s Hospital and the medical board’s expert witness, says that the exemptions issued by Kennedy appear to have been provided “without an appropriate evaluation,” according to court documents.

Kennedy has refused to respond to the board’s subpoenas seeking the medical records of three of his patients, according to court documents. The board has yet to file a formal accusation against Kennedy, and he continues to practice.

Like Kennedy, many of the doctors granting unorthodox exemptions cite their belief in parental rights or reference concerns not supported by conventional medical science. Kennedy is suing the medical board and its parent agency, the California Department of Consumer Affairs, saying the state did not have the legal right to subpoena school districts for his patients’ medical records without first informing him so he could challenge the action in court. The case is ongoing.

Kennedy declined comment to Kaiser Health News. “I don’t want to be out in the open,” he said in a brief phone exchange. “I’ve got to go. I’ve got a business to run.”

In Monterey, Douglas Hulstedt is known as the doctor to see for families seeking medical exemptions. In a brief phone interview, he said he was worried about being targeted by the state medical board. “I have stuck my neck way out there just talking with you,” he said. Hulstedt does not give exemptions to every child he examines, he said, but does believe vaccines can cause autism—a fringe viewpoint that has been debunked by multiple studies.

In March, the online publication Voice of San Diego highlighted doctors who write medical exemptions, including one physician who had written more than a third of the 486 student medical exemptions in the San Diego Unified School District. District officials had compiled a list of such exemptions and the doctors who provided them.

State Senator Richard Pan (D-Sacramento), a pediatrician who sponsored California’s vaccine law, has been a vocal critic of doctors he says are skirting the intent of the legislation by handing out “fake” exemptions. Last month, he introduced follow-up legislation that would require the state health department to sign off on medical exemptions. The department also would have the authority to revoke exemptions found to be inconsistent with CDC guidelines.

“We cannot allow a small number of unethical physicians to put our children back at risk,” Pan says. “It’s time to stop fake medical exemptions and the doctors who are selling them.”

California Healthline digital reporter Harriet Blair Rowan and California politics correspondent Samantha Young contributed to this report.