Pope Francis told Congress on Thursday that the United States should reject a "mindset of hostility" to immigrants, directly addressing a thorny subject that is dividing the country and stirring debate in the 2016 presidential campaign.
In a historic first speech by a Pope to a US Congress, the Argentine pontiff said the United States must not turn its back on "the stranger in our midst."
"Building a nation calls us to recognise that we must constantly relate to others, rejecting a mindset of hostility," the 78-year-old Francis told the Republican-dominated legislature.
Francis, the son of Italian immigrants to Argentina, delivered a wide-ranging speech in English that took on issues dear to liberals in the United States and also emphasised conservative values and Catholic teachings on the family. The Pope called for support in fighting climate change, a more equitable economy, and an end to the death penalty.
In reference to abortion and euthanasia, the Pope said humanity must "protect and defend human life at every stage of its development."
Aversion to illegal immigrants has featured heavily in the race for the Republican presidential nomination. Front-runner Donald Trump says he would deport the 11 million undocumented immigrants if he were elected to the White House and has accused Mexico of sending rapists and other criminals across the border.
Speaking softly and in heavily accented English to a packed House of Representatives chamber, Francis said America should not be put off by the number of immigrants who are trying to make it their home.
"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. To respond in a way which is always humane, just and fraternal," he said.
His comments on immigration were met with frequent applause mostly from Democrats, but from Republicans too.
After efforts by both sides to overhaul immigration laws failed, the United States saw a flood last year of more than 60,000 unaccompanied minors from Central America rushing to the US border hoping to get in.
Several Republican presidential candidates were in the audience, including retired neurologist Ben Carson, Senator Marco Rubio and New Jersey Governor Chris Christie.
A frequent critic of the damage caused to the environment by capitalism's excesses, the pope said Congress has an important role to play to "avert the most serious effects of the environmental deterioration caused by human activity."
In comments welcomed by conservatives, Francis expressed concern about threats to the family, a reference to same-sex marriage after a US Supreme Court ruling in June that made gay marriage legal across the country.
Francis said the traditional family "is threatened, perhaps as never before, from within and without. Fundamental relationships are being called into question, as is the very basis of marriage and the family."