When Jessica Biel suddenly appeared on Twitter this week with opponents of vaccination legislation at the California Capitol, it ignited a social media storm over whether the actress, wife of Justin Timberlake, had joined a lobbying campaign against the legislation amid a nationwide measles outbreak.

In an Instagram post on Thursday, Biel sought to argue she was not “anti-vaxxer” but made clear she is opposing legislation to tighten up California immunization laws.

“I am not against vaccinations — I support children getting vaccinations and I also support families having the right to make educated medical decisions for their children alongside their physicians,” she wrote. “My dearest friends have a child with a medical condition that warrants an exemption from vaccinations, and should this bill pass, it would greatly affect their family’s ability to care for their child in this state.”

The vaccination legislation, Senate Bill 276, seeks to make it more difficult for doctors to grant exemptions to the state’s immunization requirements, giving the state more control over such decisions. The bill’s author, Sen. Richard Pan (D-Sacramento), has claimed that unscrupulous doctors are granting exemptions for profit and under pressure from influential individuals.

The bill has passed the Senate, but now faces a more organized opposition effort, which includes Robert F. Kennedy Jr., a well-known critic of vaccinations. Biel quietly appeared with Kennedy at the Capitol on Tuesday, one week after Kennedy had lauded Gov. Gavin Newsom for critical remarks about the legislation. Newsom has stated he is not opposing the bill, but his remarks appear to have emboldened its critics.

The legislation comes amid a measles outbreak nationwide. There have been at least 981 cases of measles so far in 2019, which the Centers for Disease Control and Prevention says is the largest number since 1992. Across California, there have been at least 51 confirmed measles cases so far this year, including 33 associated with outbreaks.

California has some of the strictest childhood vaccination laws in the country, which requires immunizations to attend public or private schools. A doctor can excuse a child from some or all vaccinations if there is a medical reason to do so, and questions have been raised on whether some doctors are improperly approving these exemptions.

Under Pan’s bill, the California Department of Public Health would decide whether the underlying condition cited by a doctor in a medical exemption meets criteria set by the Centers for Disease Control and Prevention.

The vaccination proposal has already triggered heated and emotional debates in the state Capitol, and is now in the Assembly for consideration this summer.

In her Instagram post Thursday, Biel sought to distance herself from the anti-vaxxer label that has dogged other celebrities that have fought vaccination legislation. She said her stance was based on support for parental choice.

“That’s why I spoke to legislators and argued against this bill,” she added. “Not because I don’t believe in vaccinations, but because I believe in giving doctors and the families they treat the ability to decide what’s best for their patients and the ability to provide that treatment.”

In 2015, reports circulated that Biel and Timberlake did not plan to vaccinate their kids. But until now, Biel hasn’t taken a position on California immunization laws or legislation to tighten it.

Pan has said doctors are exploiting the state’s medical exemption law and excusing children from vaccinations for questionable reasons such as for having asthma or diabetes.

“It is our duty to protect Californians from threats to their safety,” Pan said in May. “The facts are clear — vaccines keep us safe and our children safe by preventing serious infections.”