Religious freedom is a fundamental right and an essential part of the American spirit, Pope Francis said in Philadelphia.
Addressing an excited and cheering crowd of 24,000 outside Philadelphia's Independence Hall, where the US Declaration of Independence was drafted before its adoption on July 4, 1776, the Pope spoke of the great struggles which led to the abolition of slavery, the extension of voting rights, the growth of the labor movement, and "the gradual effort to eliminate every kind of racism and prejudice directed at successive waves of new Americans."
He said religious freedom is a fundamental right "which shapes the way we interact socially and personally with our neighbors whose religious views differ from our own." History must be remembered in order to learn from the mistakes of the past and not repeat them.
And he spoke up for immigrants in what was interpreted by commentators as a rebuke to Republican frontrunner Donald Trump, who has said all illegal immigrants in the US must be deported, with their families, even if they have no country to go back to.
His address came in a context when many people of faith feel their rights are being eroded, such as in the debate over provision of contraception, and over whether Christians who take a conservative view on marriage should in the course of their employment have to follow secular law on gay marriage.
The Pope has throughout the trip made himself as accessible as possible to the public in his open Jeep Popemobile, which has made the security operation particularly intense. The only incident so far of the visit occurred last night, when a small fire broke out in an elevator shaft in the kitchen of the St Charles Borromeo seminary where he stayed the night and where he will speak shortly to 300 bishops and cardinals before his valedictory Mass marking the end of the World Meeting of Families . There was no indication of suspicious circumstances surrounding the fire.
He will also visit inmates at Curran-Fromhold prison today.
Speaking at the lectern used by Abraham Lincoln to deliver his Gettysburg address, Pope Francis said: "The Declaration of Independence stated that all men and women are created equal, that they are endowed by their Creator with certain inalienable rights, and that governments exist to protect and defend those rights. Those ringing words continue to inspire us today, even as they have inspired peoples throughout the world to fight for the freedom to live in accordance with their dignity."
These must constantly be reaffirmed and defended. "When a country is determined to remain true to its founding principles, based on respect for human dignity, it is strengthened and renewed."
"In a world where various forms of modern tyranny seek to suppress religious freedom, or try to reduce it to a subculture without right to a voice in the public square, or to use religion as a pretext for hatred and brutality, it is imperative that the followers of the various religions join their voices in calling for peace, tolerance and respect for the dignity and rights of others," Pope Francis said.
The Quakers who founded Philadelphia were inspired by a profound evangelical sense of the dignity of each individual and the ideal of a community united by brotherly love, he added.
Pope Francis, who has during his visit to Cuba and the US reminded the watching world that he himself is from an immigrant family, from Italy to Argentina, said: "Among us today are members of America's large Hispanic population, as well as representatives of recent immigrants to the United States. I greet all of you with particular affection! Many of you have emigrated to this country at great personal cost, but in the hope of building a new life."
They should not be discouraged by hardship or challenges.
"I repeat, do not be ashamed of what is part of you, your life blood. You are also called to be responsible citizens, and to contribute fruitfully to the life of the communities in which you live. I think in particular of the vibrant faith which so many of you possess, the deep sense of family life and all those other values which you have inherited. By contributing your gifts, you will not only find your place here, you will help to renew society from within."
His speech met with a warm response on social and other media.
Papal biographer Austen Ivereigh tweeted @austeni: "Expect to see words from this speech on banners years from now. It's a roadmap for the reinvigoration of American public life. #PopeInPhilly"
However, he has also been criticised for not meeting victims of clerical sex abuse.
Mark Rozzi, a businessman and a Democrat member of the Pennsylvania House of Representatives, who aged 13 was sexually molested by priests in Philadelphia along with other boys, has been calling for years for the statute of limitations to be amended so priests can be prosecuted. He told PennLive that it was an insult that the Pope had not met victms. "Seeing how the church has treated us and now the church is blocking justice for us and welcoming this guy with open arms like what church did in the past doesn't matter. It's not OK. Things aren't right. There are victims out there still committing suicide. It's got to stop. The only way is to open the courts and let the voices be heard."