Addressing an exuberant crowd of tens of thousands with the redbrick colonial building as a backdrop, he extended a warm welcome to Hispanics and immigrants.

"Do not feel discouraged by all the challenges and hardships you might face," said Francis. "I ask you not to forget that, like those who came here before you, you bring many gifts to this new nation of yours."

But he said he wanted to talk mostly about religious freedom — a rallying cry for U.S. bishops who have waged high-profile fights against gay marriage, abortion and insurer-provided birth control.

Francis didn't mention any of those topics by name in his speech, putting religious liberty instead in a historical and global context.

"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," he said, "it is imperative that the followers of various religions join their voices in calling for peace, tolerance and respect for the dignity and rights of others."

He also critiqued "technocratic" thinking, which he said "consciously aims at a one-dimensional uniformity and seeks to eliminate all differences and traditions in a superficial quest for unity."

Francis came to Philadelphia to close out a big Catholic festival for families. He found a city practically under lockdown, with blocked-off streets and checkpoints manned by police, National Guardsmen and border agents.

It remains to be seen if the expected 1 million people will turn out for Francis' final Mass in the U.S., an outdoor event Sunday on the Benjamin Franklin Parkway.

He reached Independence Hall in his open-sided Jeep, rolling slowly past adoring crowds and kissing babies handed to him by members of his security detail.

Earlier in the day, the pontiff arrived from New York at the Philadelphia airport, where a Catholic high school band played the theme song from the Philadelphia-set movie "Rocky." Among those greeting him was Richard Bowes, a former Philadelphia police officer wounded in the line of duty. Francis also kissed the forehead of a 10-year-old boy severely disabled with cerebral palsy.

Francis then celebrated a Mass for about 1,600 people at the downtown Cathedral Basilica of Sts. Peter and Paul, saying in his homily that the future of the Catholic Church in the U.S. requires a much more active role for lay Catholics, especially women.

Al Jazeera and Associated Press