Pope Francis discusses immigration, climate change, the death penalty and more during his address to Congress. (Monica Akhtar/The Washington Post)

It was a historic appearance, and Pope Francis seized the moment when he addressed a joint meeting of Congress on Thursday at the Capitol. In words and by example, the pontiff challenged the nation’s elected leaders to tackle the most vexing problems in today’s society — and to do so in ways that bind and unify rather than divide and polarize.

The agenda Francis presented on Thursday was a reflection of the ambitions of his papacy, one that has shaken and in many ways revitalized the institutions of the Roman Catholic Church. He spoke again about the urgent need to combat poverty and wealth inequality, to deal forthrightly with the impact of global climate change, and, in the ways of the golden rule, to treat immigrants as we would want to be treated.

If that seemed to tilt in the direction of the priorities of the left, it certainly did. But for all those on the left in the House chamber who cheered those words, Francis offered comfort to the right as well as he reiterated, though gently, his commitment to defending religious liberty and to church teachings on family and respect for all life at a moment when same-sex marriage and abortion are again at the forefront of a pitched political debate in this country.

Francis’s appearance came during a time of division and rancor in America’s politics, with a presidential campaign — particularly on the Republican side — that has been marked by insults and antagonisms and as Congress again confronts the prospect of another government shutdown. With all that swirling through the nation’s capital, Francis spoke more as the spiritual leader he is, rather than as the politician that many believe he also is.

His most important message, perhaps lost in a chamber where constant combat is reflexive, was to remind his audience that its greatest responsibility is not to party or personal ambition but to the collective good. “You are called to defend and preserve the dignity of your fellow citizens in the tireless and demanding pursuit of the common good,” he said, “for this is the chief aim of all politics.”

Francis has captivated Washington during his visit this week as have few recent visitors. The enthusiasm for him has been palpable in the crowds that have lined the streets outside his appearances, with young and old pressed against barriers, peeking through parked buses and standing on street corners — cellphone cameras held high — in the hopes of getting a glimpse of him.

His trip has provided a respite from the political wars that have been raging all around. Cable television has shifted its focus, at least in part, from the bombast of Donald Trump or the controversies surrounding Hillary Rodham Clinton or the latest in an endless series of polls to the model offered by a religious leader who, while not shying from controversial topics, has sought to project humility and openness to others.

In addressing Congress, Francis drew on the history of America for his text, citing four Americans who he said embodied the message he was delivering. Abraham Lincoln defended liberty. The Rev. Martin Luther King Jr. gave all people the possibility to dream of full rights. Catholic social activist Dorothy Day worked for justice for the oppressed. He said the contemplative style of Thomas Merton, the Catholic writer and Trappist monk, showed “how the fruit of a faith” becomes “dialogue and sows peace.”

Francis’s priorities have thrust him into the political debates. His focus on climate change and inequality have drawn sharp criticism from the right. In his major public remarks, beginning at the White House on Wednesday, he has shown a willingness to advance the causes that have been at the heart of his papacy.

He reminded his audience Thursday that political activity “must serve and promote” human beings and their dignity. “If politics must truly be at the service of the human person,” he said, “it follows that it cannot be a slave to the economy and finance. Politics is, instead, an expression of our compelling need to live as one, in order to build as one, the greatest common good.”

From his private meeting with President Obama to giving the first-ever papal address before a joint session of Congress, Pope Francis did not shy away from politics during his three-day stop in Washington, D.C. (Julie Percha/The Washington Post)

He added, tellingly: “I do not underestimate the difficulty that this involves, but I encourage you in this effort.”

During his visit, Francis has taken all manner of politically divisive topics — beyond inequality and climate and immigration, he called Thursday for the abolition of the death penalty, an end to the arms trade and the blood-drenched money it generates, and the dangers of religious fundamentalism and extremism. But throughout, he has offered words of another kind designed to heal rather than harm, to calm the waters rather than stir them.

That was part of the message he delivered on Thursday in the House chamber, but he perhaps said it best when he addressed Catholic bishops on Wednesday at the Cathedral of St. Matthew, not far from the White House. There, he urged his flock “to dialogue fearlessly” but to do so with humility and understanding.

“Harsh and divisive language does not befit the tongue of a pastor,” he said. “It has no place in his heart. Although it may momentarily seem to win the day, only the enduring allure of goodness and love remains truly convincing.”

Francis cannot turn politicians into pastors. The political wars will resume with his departure. Indeed, they were on display throughout his speech, which at times took on the trappings of a presidential State of the Union address with dueling responses to specific sentences, paragraphs or issues.

Nor can he resolve those political differences about which he spoke with one visit. That was not his purpose. But as the first pope to address Congress, Francis both met the members of his audience where they live and sought to elevate them to a higher place. Which is what made his appearance as memorable as it was historic.