The pope arrived at the White House in a modest Fiat to find a crowd of 11,000 people, including Vice President Joseph R. Biden Jr., Secretary of State John Kerry and Representative Nancy Pelosi of California, the Democratic minority leader, all Catholics, as well as about half of the members of Congress. The White House rolled out its best color guards, including a fife-and-drum corps, but opted against the 21-gun salute that is traditional for such ceremonies.

Mr. Obama thanked the pope for his help in restoring American diplomatic relations with Cuba and hailed him for speaking out for the world’s most impoverished. “You shake our conscience from slumber,” he said. “You call on us to rejoice in good news and give us confidence that we can come together, in humility and service, and pursue a world that is more loving, more just and more free.”

In his own remarks, the pope noted the country’s origins at a time when critics of illegal immigration were pushing to build a wall at the southern border. “As the son of an immigrant family, I am happy to be a guest in this country, which was largely built by such families,” Francis said.

He devoted more of his address to climate change than any other topic. “Mr. President,” Francis said, “I find it encouraging that you are proposing an initiative for reducing air pollution.” He added that there was still time to heal the planet for its children. “To use a telling phrase of the Rev. Martin Luther King, we can say that we have defaulted on a promissory note, and now is the time to honor it,” he said.

The ceremony brought together two men with starkly disparate backgrounds and yet commonalities that have united them now, a community organizer from Chicago and a priest from Argentina, both presenting themselves as champions of the powerless. While they first met last year at the Vatican, their appearance on Wednesday carried a visual and possibly a political power that solidified the impression of a secular-theological alliance.