It is generally stated that the atheist Voltaire recanted his atheism on his deathbed.Whether true or not - and I suspect that a great many agnostics and atheists do do this - he is still good for a telling quote or two:
"It is dangerous to be right when the government is wrong".