In his homily, Francis praised families as the nucleus of society, calling them "the nearest hospital, the first school for the young, the best home for the elderly." He said miracles are performed every day inside a family out of love, but sometimes the love and happiness run out.
"How many women, sad and lonely, wonder when love left, when it slipped away from their lives?" he asked. "How many elderly people feel left out of family celebrations, cast aside and longing each day for a little love?"
Firefighters sprayed water from hoses on the crowd to provide relief from a searing sun and high humidity that made the 30°C temperature in the Pacific port city of Guayaquil feel at least five degrees hotter.
Many pilgrims had spent the night outdoors, and some walked for miles to reach the park on Guayaquil's northern outskirts to catch a glimpse of history's first Latin American pope celebrating Mass on his home turf. They said it was well worth the discomfort.
"I'm tired, I'm hungry, I haven't slept, but I'm also full of emotion and joy in my heart," said Vicente Huilcatoma, a former police officer who walked 40km to reach Samanes Park.
One million people
The Vatican originally estimated more than 1 million people would turn out for the Mass, and government organisers put the crowd at above that figure in the hour before the service began. But Gabriel Almeida, the government spokesperson at the scene, rolled back the estimate to about 550 000 after officials viewed aerial images of the area.
Across the park, flags from Ecuador and more than a half dozen other countries waved above the enormous sea of people, who were divided into quadrants that Francis looped around slowly on his popemobile to cheers of "Francisco! Francisco!"
The pope's homily brought Janeth Valencia Bersosa to tears. The primary school teacher came to the Mass with her older sister Pilar from Cuenca, about 200km away, spending the night in the park and then baking under the heat of the noontime Mass. She said it was worth it.
"Francis has given us back hope in our families, in those we love the most, the nucleus of society," she said. "I wept at each phrase."
Francis has dedicated the first two years of his pontificate to family issues, giving weekly catechism lessons on different aspects of family life and inviting the entire church to study ways to provide better pastoral care for Catholic families facing difficulties today, including people who are divorced, gays and families in "non-traditional" situations.
Meetings on ‘family life’
A preliminary meeting of bishops on these issues ended last year in bitter divisions between liberals and conservatives, particularly over ministering to gays and to Catholics who divorce and remarry outside the church. Church teaching holds that Catholics who enter into a second marriage without having the first one annulled cannot receive Communion.
In his homily on Monday, Francis said he hoped the second meeting of bishops on family life, scheduled for October, would come up with "concrete solutions to the many difficult and significant challenges facing families in our time."
"I ask you to pray fervently for this intention, so that Christ can take even what might seem to us impure, scandalous or threatening, and turn it... into a miracle."
"Families today need miracles!" he added.
The Vatican spokesperson, the Reverend Federico Lombardi, said Francis wasn't referring to the gay or divorce issue specifically but was making a more general reference that he hoped the bishops would "help the church chart this path of leaving a situation of sin to one of grace."
Upon his arrival in Guayaquil, the pontiff allowed several acolytes on the tarmac to take selfies with him. He then headed to the Shrine of the Divine Mercy, where 2 000 invitees gathered, including young cancer patients, residents of homes for the elderly abandoned by their families and some of Guayaquil's poorest people.
He told those gathered that he would pray for them "and I won't charge you a thing. All I ask, please, is that you pray for me."
After the open-air Mass, Francis had lunch with a group of Jesuits at a nearby high school.
A highlight was his reunion with the Reverend Francisco Cortes, a priest affectionately known as "Padre Paquito," to whom the Argentina-born pope, then the Reverend Jorge Mario Bergoglio, entrusted his seminarians on study trips to Ecuador years ago.
In a recent interview with The Associated Press, Cortes couldn't fathom that Bergoglio remembered him, much less made a point of coming to have lunch. "I don't know what to ask him," the soon-to-be 91-year-old Cortes said. "I'm really just a Mr Nobody."
Returning to the capital of Quito at dusk, Francis paid a 50-minute courtesy visit to Rafael Correa at the presidential palace. When it ended, Correa ushered him to reception line of dozens that took a quarter hour to negotiate.
The pope then prayed in Quito's cathedral and went out on the steps to address a crowd, many of whom had waited hours to see him and endured a deluge. But instead of giving the short speech that he had prepared, Francis offered a brief blessing.
Tuesday brings another big public Mass, this time in Quito, as well as a meeting with the country's bishops, a speech at Ecuador's Catholic University and an evening gathering with civil society groups, including indigenous leaders.
Tens of thousands who lined up outside the Quito park where the Mass was to be held got soaked in a punishing rain and hail storm. People grabbed what they could to protect themselves. They tore vinyl advertising placards off the metal fences surrounding the park, which was the city's international airport until two years ago.
Some just shrugged it off. Although her clothes were soaked and she shivered in the cold of Quito's 9,000-foot altitude, 71-year-old Angelica Naranjo said: "This isn't a sacrifice. It's a demonstration of faith."
Quito security chief Juan Zapata said officials would distribute blankets from stocks kept by civil defence authorities.