VATICAN CITY — Five years ago, Pope Francis was elected to be an agent of change within a church shaken by scandals and the historic resignation of Benedict XVI. He quickly became a global force in geopolitics, setting the agenda on climate change and care for migrants. World leaders wanted to be near him. Even non-Catholics adored him.

Today, Francis is increasingly embattled. The political climate has shifted abruptly around the world, empowering populists and nationalists who oppose much of what he stands for. Conservative forces arrayed against him within the Vatican have been emboldened, seeking to thwart him on multiple fronts.

Yet a close look at his record since becoming pope and the strong reactions he has engendered also shows that Francis continues to get his way in reorienting the church. And his supporters say that the backlash against his views has only made his voice more vital in the debate inside and outside the church over the issues he has chosen to highlight, like migrants, economic inequality and the environment.

But even they concede that Francis’ message has fallen decidedly out of sync with the prevailing political times, in contrast to, say, Pope John Paul II, who provided the spiritual dimension for Ronald Reagan and Margaret Thatcher’s battle against communism.