"In this witness, which frequently encounters powerful resistance," the Pope said, "you remind American democracy of the ideals for which it was founded, and that society is weakened whenever and wherever injustice prevails."
Drawing cheers from the large crowd on Independence Mall, where many of the faithful waved flags from countries such as Costa Rica and Mexico, the Argentine-born Francis urged his diverse flock to "never be ashamed of your traditions."
"Do not forget the lessons you learned from your elders," he said, "which are something you can bring to enrich the life of this American land."
The Pope has praised the country's immigrant history during nearly every speech of his weeklong visit to the United States, which ends Sunday evening. The issue resonates with him personally, he said Wednesday in Washington, since not only is he Latin American, but his parents immigrated to Argentina.
Francis made his remarks from the same lectern Abraham Lincoln used to give the Gettysburg Address, a fitting setting for a speech stressing freedom.
While he ranged widely in Saturday's speech -- using geometry to make a point about globalization, for example -- the address was just as notable for what he did not say.
The archbishop of Philadelphia, Charles Chaput, an ardent culture warrior, said he asked the Pope to address religious freedom in the birthplace of American independence.
Francis paid historical homage to those values, citing, for example, the Quakers who founded this city. But there were no explicit references to any of the U.S. Catholic bishops' recent battles over religious rights.
There was no mention, for example, of the Little Sisters of the Poor's lawsuit against the contraception mandate in the Affordable Care Act. (On Wednesday, though Francis did meet with the nuns in Washington -- a "show of support," according to a Vatican spokesman.)
Francis never mentioned the Catholic adoption agencies that have closed rather than place children with gay couples. Nor did he explicitly allude to the "Fortnight for Freedom" that the U.S. Conference of Catholic Bishops have held to rally support against "current threats to religious liberty."
The Pope did say, however, that the rights of the faithful should extend well beyond the sanctuary door.
"Religious freedom certainly means the right to worship God, individually and in community, as our consciences dictate," he said. "But religious liberty, by its nature, transcends places of worship and the private sphere of individuals and families."
The Pope made a similar point, and in nearly identical language, in communist Cuba, which he visited for three days before coming to the United States.
Archbishop Thomas Wenski of Miami said he was heartened by the Pope's speech. "It was a shot in the arm for the church, and especially for the bishops."
The archbishop said he was not disappointed that Francis did not delve deeper into American politics.
"He was there as the Pope and as a bridge builder," Wenski said. "He was calling us to dialogue, using a softer approach so as not to have the other side raise their defenses."
Francis was most animated and drew the loudest response when he addressed Latino-Americans, greeting them with "particular affection."
"Do not be discouraged by whatever challenges and hardships you face," he said, to loud cheers. "I ask you not to forget that, like those who came here before you, you bring many gifts to your new nation. "
Ahead of the speech, crowds filled the streets long before Francis' arrival. The City of Brotherly Love was an eerie mix of carnival and ghost town.
National guardsmen stood on deserted corners blocks away from the main events.
With many roads closed, vehicle traffic ground to a halt and throngs of pedestrians pulsed through the streets to get to their destinations. Groups of pilgrims marched together, singing religious songs.
Vendors hawking pope swag did everything they could to stop them in their tracks, shouting out catchy slogans as they toted bags full of flags, pins, T-shirts, dolls and rosaries.
With his bike parked near Philadelphia's 30th Street Station, Officer Chris Denshuick stood with a Taser and radio holstered on his belt -- and a plush Pope doll tied to his handlebars.
The University of Pennsylvania police officer got it as a souvenir for his 12-year-old daughter. But for now, he's using it as a way to help people feel more comfortable talking to police.
"It's a great time to be here and be more approachable," he says.
That's a message, Denshuick says, that the Pope also is sending.
"He's a people's Pope," he said.
The people's Pope later Saturday made an appearance at the star-studded Festival of Families.
Comedian Jim Gaffigan opened for him.
Gaffigan, a devout Catholic, performs clean comedy and said "the pressure" was on for this show.
Asked how he landed the role, Gaffigan joked, "I think they searched throughout North America for the worst Catholic there is."
Gaffigan, whose five kids and wife were in the audience, was one of several stars performing.
Gospel and soul great Aretha Franklin sang as Francis clapped to the beat. Actor Mark Wahlberg, also a Catholic, emceed the event.
When it was time for Francis to take center stage, he tossed out his prepared remarks and gave an uplifting message about families.
Calling families "a factory of hope," Francis drew laughs from the crowd as he acknowledged his message might be greeted with skepticism by some.
"Father, you speak like that because you're not married," a skeptic might say, he said. "Families have difficulties. In families we quarrel. Sometimes, plates can fly. Children cause headaches. I won't speak of mother-in-laws."
"But," the Pope added, "in families, there is always light."
Francis earlier attended a Mass before more than 2,000 mostly priests, women religious and deacons.
The Mass at the Cathedral Basilica of Saints Peter and Paul was a spiritual boost for the city's clergy, who have been battered in recent years by sexual abuse scandals, parish mergers and school closings.