South Bend, Indiana mayor and 2020 presidential candidate Pete Buttigieg backtracked on his support for exemptions for vaccinations on Wednesday.

After Buttigieg's spokesperson said the mayor supports " personal/religious exemptions if states can maintain local herd immunity and there is no public health crisis," the campaign later said the mayor only supports medically necessary exemptions.

Visit Business Insider's homepage for more stories.

South Bend, Indiana mayor and 2020 presidential candidate Pete Buttigieg backtracked on his previous support for exemptions for vaccinations on Wednesday.

"The law of the land for more than a century has been that states may enforce mandatory vaccination for public safety to prevent the spread of a dangerous disease. Pete does support some exceptions, except during a public health emergency to prevent an outbreak," a spokesperson for Buttigieg told BuzzFeed News.

The spokesperson said these exemptions include "medical exemptions in all cases (as in cases where it is unsafe for the individual to get vaccinated), and personal/religious exemptions if states can maintain local herd immunity and there is no public health crisis."

But the campaign changed its position in later statement on Wednesday morning, stating the mayor only supports medically necessary exemptions for vaccinations.

"Pete believes vaccines are safe and effective and are necessary to maintaining public health," the spokesperson said. "There is no evidence that vaccines are unsafe, and he believes children should be immunized to protect their health. He is aware that in most states the law provides for some kinds of exemptions. He believes only medical exemptions should be allowed."

Some other 2020 candidates have taken much stricter positions on the issue, including Sen. Elizabeth Warren, Sen. Cory Booker, and Rep. Tim Ryan, who've all called for an end to religious and personal exemptions.

But other candidates have been more vague in their positions on exemptions.

Read more: Pete Buttigieg was falsely accused of sexual assault in a stunt concocted by conspiracy theorist Jacob Wohl

President Donald Trump recently urged families to get their kids vaccinated, after spending years hyping debunked claims that vaccines cause autism.

"Massive combined inoculations to small children is the cause for big increase in autism," Trump tweeted in 2012.

On the presidential debate stage in 2015 Trump refused to disavow those claims, saying he was "totally in favor of vaccines, but I want smaller doses over longer periods of time" in order to prevent autism.