Pope Francis declared before Congress on Thursday that the world must respond with humanity, not hostility, to refugees and immigrants streaming across borders in search of a better life.
"When the stranger in our midst appeals to us, we must not repeat the sins and errors of the past," he said in an unprecedented address to a joint session of Congress.
With Supreme Court justices, diplomats and members of the Cabinet joining lawmakers in rapt attention — and with tens of thousands of joyous fans waiting to welcome him outside — Francis delivered a message of hope and tolerance.
Speaking in English, he called for the worldwide abolition of the death penalty because "every life is sacred," and he said the world must meet fundamentalism and strife with "hope and healing."
He repeated his familiar exhortation to fight climate change, and he said that technology and business must be harnessed to advance social progress.
The pope focused on four Americans as examples of dignity, justice and service to God: President Abraham Lincoln, the Rev. Martin Luther King Jr., the late Catholic social activist Dorothy Day and the late Catholic writer and monk Thomas Merton.
Francis said that the world is facing a refugee crisis not seen since World War II, and he invoked the Golden Rule in urging the world to respond "in a way which is always humane, just and fraternal."
"We must not be taken aback by their numbers, but rather view them as persons, seeing their faces and listening to their stories, trying to respond as best we can to their situation," he said.
Similarly, and at the beginning of a presidential campaign that has focused on immigration, he urged the people of North America not to be fearful of foreigners.
"I say this to you as the son of immigrants, knowing that so many of you are also descended from immigrants," he said.
Invoking the Golden Rule, the pope said: "Let us help others to grow, as we would like to be helped ourselves. In a word, if we want security, let us give security; if we want life, let us give life; if we want opportunities, let us provide opportunities."
He spoke of his deep concern for the state of the family, and said that fundamental relationships and "the very basis of marriage" are being called into question.
He said that too many young people are dissuaded from starting a family, and that many are trapped in a maze of violence and despair.
"Their problems are our problems," the pope said. "We cannot avoid them. We need to face them together, to talk about them and to seek effective solutions rather than getting bogged down in discussions."
On world affairs, Francis rejected the "simplistic reductionism which sees only good or evil." He said that the world must summon hope and cooperation to work for the common good, and he called for respect for differences of conscience.
"Even in the developed world, the effects of unjust structures and actions are all too apparent," he said. "Our efforts must aim at restoring hope, righting wrongs, maintaining commitments, and thus promoting the well-being of individuals and of peoples."
Francis walked into the House chamber to cheers and applause. Almost immediately after he began speaking, he was interrupted by applause and a standing ovation as he expressed thanks for the invitation to speak "in the land of the free and the home of the brave."
Vice President Joe Biden and House Speaker John Boehner, both Catholics, watched from behind the rostrum, as they would for a State of the Union speech. Boehner wiped tears from his eyes with a handkerchief.
Earlier, the pope left the Vatican diplomatic mission in Washington and, as he had the day before, grasped the hands of cheering crowds behind security barricades. He rode to the Capitol in a little black Fiat.
There, Francis shook hands with Boehner and met with him privately.
In the chamber, he was introduced by the House sergeant-at-arms: "Mr. Speaker, the pope of the Holy See."
An enormous crowd gathered on the west lawn outside the Capitol, where presidents gaze out at the Washington Monument for inaugural addresses, to catch a glimpse of Francis after his address.
Security for all of it was called unprecedented, too. The Secret Service was in charge of the daunting task of guarding a tactile pope who relishes the change to interact up close with the faithful.
"What the pope wants, he gets. It's that simple," New York Police Commissioner Bill Bratton said on MSNBC.
The pope captivated crowds in Washington on Wednesday. At the White House, he issued a challenge to fight climate change, nodded to the contributions of immigrants to the United States and called for religious tolerance and an end to discrimination.
Members of Congress were asked to be on their best behavior, refraining from handshakes or conversations with the pope.
Francis addressed a Congress that is deeply divided and, by its own members' admission, dysfunctional. Republicans are threatening a partial government shutdown next week over federal funding for Planned Parenthood.
The bickering was set aside, for history and at least for a day.
"Americans have watched Pope Francis capture the imaginations of many with his unique and engaging style," Sen. Mitch McConnell of Kentucky, the Republican majority leader, said in a welcome video on Thursday.
"Americans have watched the pope reach new and different audiences, both from within his flock and far beyond it," he said. "And now thousands of Americans from every faith — nearly every walk of life — will gather here, on the Capitol grounds, to listen to him speak."
At least one Catholic member of Congress, Rep. Paul Gosar, R-Ariz., announced that he would boycott the speech because of the prospect that Francis might focus on climate change.
"When the pope chooses to act and talk like a leftist politician, then he can expect to be treated like one," Gosar wrote last week on the website Town Hall.
The pope's six-day visit to the United States has been called an unprecedented security challenge. On Wednesday, a 5-year-old girl got past security barriers and onto the papal parade route. Francis welcomed her aboard the popemobile and gave her a kiss.
After his appearance at the Capitol, the pope will bless a meal at a Catholic charity, then fly to New York for evening prayers at St. Patrick's Cathedral. He is to address the United Nations on Friday and visit Philadelphia over the weekend.
This story originally appeared on NBCNews.com