PHILADELPHIA (CNS) -- Pope Francis threw away a prepared text and, to the delight of tens of thousands of people on the Benjamin Franklin Parkway, spoke from the heart about the challenges and love that come with being part of a family.

After listening to testimony from six families from various continents Sept. 26, he thanked them for sharing their stories.

"A witness given in order to serve is thoroughly good, it makes us good persons, because God is goodness," he began, continuing to increase in speed and emphasis to the delight of the crowd. He smiled, gestured with his hands and the crowd cheered as he said it was "worth being a family."

God sent his son into a family, he said, "and he could do this because it was a family that had a truly open heart," he said.

The pope spoke in Spanish, the language in which he is most comfortable; his talk was translated by Msgr. Marc Miles. "We are celebrating the feast of the family," he told the crowd. "Families have a citizenship that is divine. The identity card that they have is given to them by God so that within the heart of the family truth, goodness and beauty can truly grow."

"Some of you might say of course, Father, you speak like that because you're not married," he said.

"Families have difficulties. Families -- we quarrel, sometimes plates can fly, and children bring headaches. I won't speak about mother-in-laws," he quipped.

"However, in families, there is always light" because of the love of God's son.

"Just as there are problems in families, there is the light of the resurrection," he said.

"The family is like a factory of hope," he said.

"In the family, there are indeed difficulties" and children bring challenges, too, he said.

"But those difficulties are overcome with love," he said. "Hatred is not capable of dealing (with) or overcoming any difficulty. Division of hearts cannot overcome a difficulty; only love can overcome."

The three-hour celebration of Catholic family life began as the sun started to set over Philadelphia. The festival included prayer, music, dance, comedy and testimonies of faith and followed on the heels of the eighth World Meeting of Families Sept. 22-25.

Shortly after 7 p.m. the pope began his approach to the festival site in his popemobile, waving to the thousands of people who lined the route. Dozens of flags and banners of different countries hung over steel barricades lining the route into Benjamin Franklin Parkway toward the Festival of Families stage. He mounted the festival stage to raucous cheers, shortly after 7:30 p.m., and led the crowd in a prayer of petition for the family.

Actor Mark Wahlberg emceed the portion of the evening featuring the pope. Among the renowned entertainers to perform for the pope and offer testimonies of faith were American soul singer Aretha Franklin and Italian tenor Andrea Bocelli.

Dr. Gianna Emanuela Molla read a letter her mother, St. Gianna Beretta Molla, had penned to her father, bearing witness to their faithful marriage. Six couples from different continents also shared their life stories.

The night before the festival began, people began gathering behind barricades on downtown streets, many sleeping on flattened cardboard boxes and donning Pope Francis T-shirts, World Meeting of Families caps or apparel from their home parishes. Those with tickets started to enter the heavily secured area in the early afternoon, including numerous priests, seminarians and women religious, who sat under a canopy of trees in the cool breeze watching performers practice before the celebration.

Mother Joan Paul of the School Sisters of Christ the King in Lincoln, Nebraska, brought four sisters with her to the World Meeting of Families and to see the pope.

"The Holy Father is someone who I want to be near. I am near him in his thoughts every day, but I wanted to be here physically," she said. "And for us to be here with families also is important because our families are being pulled so many different directions because of society, and we need to reconnect and come back to our important values."

In his talk, the pope noted the challenges families face, including quarrels and inimical relationships.

"Never let the day end without making peace," he said. "A society is strong, it's solid if it's edified on beauty, goodness and truth."

He told those present that God likes most "to knock on the doors of families and to find families that are united, that love each other" and who raise their children in view of creating "a society of truth, goodness and beauty."

The family must take special care of children and grandparents, he said. Children are "the strength that moves us forward" and "grandparents are the living memory of the family. They pass on the faith; they transmitted the faith to us."

"To look after grandparents and children is an expression of love," he said. "A people that does not know how to look after children and grandparents is a people that has no future because it does not have the strength or the memory to go forward."

Jay and Tracie Ciccarone, members of St. Katharine of Siena Catholic Church in Wayne, Pennsylvania, brought their four pre-teen boys -- Wylder, Truitt, Tommy and David -- to the festival.

"This is a once-in-a-lifetime event for them," Tracie Ciccarone said before the pope spoke. "We wanted to do it together because it is all about the family.

"It is all about making memories and having something to look back to," she said.

Steve Giuliano, who is not Catholic, received tickets to the festival for in-kind services he and his employer provided for the pope's visit.

He said his mother was among numerous area residents who left the city for the weekend, fearing gridlock and chaos, and many business owners had blamed loss of income to the street closures. But he said that the pope's visit was good for everyone.

"He is bringing so many people back to the Catholic Church," he said. "He is a great leader for the church, no matter your religion." - - - Contributing to this story was David Sedeno.