PHILADELPHIA – Pope Francis bid a tender farewell to the United States Sunday night, telling well-wishers at Philadelphia’s airport that he was leaving with “a heart full of gratitude and hope.”

After a nine-day trip that took him from the cradle of communism to the halls of democracy – and which included meetings with sexual abuse victims, immigrants, prisoners, the homeless, and the poor – the pope left behind an infatuated country and a newly energized Church as he returned to Rome.

And he took the opportunity to praise US Catholics for their work on behalf of the disadvantaged.

“I thank the Lord that I was able to witness the faith of God’s people in this country, as manifested in our moments of prayer together and evidenced in so many works of charity,” Francis said.

“Your care for me and your generous welcome are a sign of your love for Jesus and your faithfulness to him,” the pope said. “So, too, is your care for the poor, the sick, the homeless and the immigrant, your defense of life at every stage, and your concern for family life.”

After thanking the organizers and volunteers with the World Meeting of Families gathered in a hangar at the airport, he mentioned specifically his canonization of St. Junipero Serra and his visit to the 9/11 Memorial, saying that both events held great meaning for him. He also asked that his thanks and prayers be conveyed to President Barack Obama and members of Congress.

Francis joined hundreds of thousands of the faithful Sunday for the last and biggest event of his US visit, telling a massive crowd at an outdoor Mass on the Benjamin Franklin Parkway that families and homes are “true domestic churches.”

Holiness lies in little gestures of tenderness and compassion, Francis said in his homily, citing a warm meal waiting at home, a hug after a hard day at work, or a blessing before bedtime as examples.

“These little gestures are those we learn at home, in the family; they get lost amid all the other things we do, yet they do make each day different,” he said. “They are the quiet things done by mothers and grandmothers, by fathers and grandfathers, by children.”

All of these little signs of love are proof of Jesus’ presence in our lives, he said.

The Mass was the closing event of the triennial World Meeting of Families, held in the United States for the first time. It was announced near the end of Mass that the next meeting will be in Dublin, Ireland, in 2018.

Ireland is ground zero for the Church’s clergy sex abuse crisis outside of the United States. The overwhelmingly Catholic country recently legalized gay marriage.

The Mass Sunday evening capped a busy day in which Francis met with victims of sexual abuse and offered words of hope to jail inmates.

Riding through the streets in his open-sided popemobile, the 78-year-old pontiff waved to cheering, screaming, singing, flag-waving crowds as he made his way up the Benjamin Franklin Parkway.

He spent more than 30 minutes blessing the crowds from the popemobile, kissing babies brought to him by Italian Domenico Giani, head of papal security, and stopping to see the Knotted Grotto at the city’s cathedral: 30,000 prayer intentions submitted online and written on white knotted ribbons.

The exhibit was inspired by one of Francis’ favorite paintings, “Mary, Undoer of Knots,” showing Mary untangling a long ribbon symbolizing life’s difficulties. The painting hangs in a church in Germany, where then-Rev. Jorge Mario Bergoglio saw it while studying in the mid-1980s.

Organizers predicted a crowd of 1 million at the Mass, though there were fears that the unprecedented security, including airport-style bag searches, crowd-control cattle chutes, and blocked-off streets, had scared many people away and would depress the turnout.

During his homily, Francis described the massive Christian crowd gathered to celebrate the family as “a miracle in today’s world.”

“[If only] all of us could be open to miracles of love for the sake of all the families of the world, and thus overcome the scandal of a narrow, petty love, closed in on itself, impatient of others!”

Earlier in the day, in a gesture of reconciliation, he met with victims of child sexual abuse and told them he is “deeply sorry” for the times they came forward to tell their story and weren’t believed. He assured them that he believes them and that bishops will be called to account for what they did.

“I pledge to you that we will follow the path of truth wherever it may lead,” Francis said in Spanish. “Clergy and bishops will be held accountable when they abu se or fail to protect children.”

Then he went into a meeting with American bishops in town for a Catholic festival on the family and told them the same thing face-to-face.

“God weeps” over what was done to the youngsters, he said.

Also, Sunday, Francis visited a Philadelphia jail to give hope of redemption to about 100 inmates, included suspected killers, rapists and mobsters. He greeted the men one by one, telling them to use their time behind bars to get their lives back on track.

“May you make possible new opportunities, new journeys, new paths,” he said, standing before a wooden chair the men had made for him for the occasion.

The blue-uniformed inmates, some of them heavily tattooed, seemed moved. They clasped Francis’ hands, and two gave him a hug.

Francis’ journey also took him to Washington and New York. Along the way, he drew large and adoring crowds, met with President Barack Obama, visited Ground Zero, and addressed Congress and the United Nations, calling for urgent action on climate change and poverty.

Material from the Associated Press was used in this report.