“They have to get the shots,” he said during a press conference outside the White House. “The vaccinations are so important. This is really going around now. They have to get their shots.”

In a change of tune, President Donald Trump on Friday urged the public to get vaccinated against measles as cases of the viral infection continue to crop up across the country.

"They have to get their shots. The vaccinations are so important," President Trump said amid the worst measles outbreak in recent history. Previously, Trump has falsely claimed there is a link between the measles vaccine and autism. pic.twitter.com/jRknC6wNW0

Centers for Disease Control and Prevention data released this week showed that as of April 19, the number of reported cases in 2019 had already reached 626 ― the worst since 2014, which saw 667 cases over the entire year.

So far, 22 states from coast to coast have reported measles cases, while those facing three or more ongoing cases include Michigan, Washington state, New Jersey and parts of New York and California.

For Trump, the pro-immunization message appears to be a shift in attitude, since he previously suggested that vaccines could cause autism.

In 2015, during a Republican presidential primary debate moderated by CNN, the then-candidate explained that while he was “totally in favor of vaccines,” he wanted “smaller doses over a longer period of time.”

Without giving a name, Trump then cited the case of a 2-year-old who “went to have the vaccine, and came back, and a week later got a tremendous fever, got very, very sick, now is autistic.”

In 2017, anti-vaccine advocate Robert F. Kennedy Jr. said Trump asked him to head up a new panel on “vaccine safety and scientific integrity.”

In response, American Academy of Pediatrics executives released a statement emphasizing that immunizations “are the most significant medical innovation of our time.”

“Claims that vaccines are linked to autism, or are unsafe when administered according to the recommended schedule, have been disproven by a robust body of medical literature,” the statement added.