White House chief medical adviser Dr. Anthony Fauci said he would not continue to serve in his role if Donald Trump was elected to a second term as president.

"Well, no," Fauci said with a chuckle when asked by CNN's Jim Acosta on Sunday if he would stay on in his post if the Republican former President were to return to the White House. Trump has teased a 2024 run for office, though he has not officially launched a second campaign for president.

Acosta also asked Fauci if he would have confidence in Trump's ability to respond to COVID-19, if it's still a threat, or another public health emergency.

"If you look at the history of what the response was during the administration, I think, you know, at best you could say it wasn't optimal," Fauci said. "And I think just history will speak for itself about that."

Fauci, who is also the director of the National Institute of Allergy and Infectious Diseases, was a leading member of Trump's White House coronavirus taskforce as the virus took hold in the US in 2020. He has served under seven different U.S. presidents.

Fauci often disagreed with the Trump administration over its handling of the COVID-19 pandemic, about which the then-President promoted false claims and often downplayed as the deadly virus infected millions of Americans. Fauci also gave medical advice, such as mask-wearing, that Trump and some in his administration often ignored.

Trump attacked Fauci publicly, suggesting at one point he was considering firing him, and by the end of his presidency, Fauci was largely sidelined.

Fauci admitted last year that it was "uncomfortable" when drugs such as hydroxychloroquine were promoted as treatments for COVID-19 when it wasn't evidence-based, and that he takes "no pleasure at all in being in a situation of contradicting the President."

He called it a "liberating feeling" to be able to "talk about what you know, what the evidence, what the science is," without fear of repercussion.