QUITO, Ecuador -- Pope Francis has a whirlwind final full day in Ecuador on Tuesday, with an open-air Mass in the capital sandwiched between meetings with bishops, indigenous groups and students and capped by a visit to a famed Jesuit church.

The 78-year-old pontiff, who has only one full lung, appears to be holding up well at the start of his eight-day, three-nation South American tour despite the 2,800-meter (nearly 9,200-feet) altitude of Quito and a day spent in the scorching sun of coastal Guayaquil. He had so much energy he slipped out again for a second night Monday to greet well-wishers who gathered outside the Vatican ambassador's residence where he is staying.

"It's always surprising what the pope can do at his age," said the Vatican spokesman, the Rev. Federico Lombardi. He noted that several people in the Vatican entourage awoke Monday with headaches due to altitude sickness, but not the pope.

"He has said it's God's way of helping him do his ministry, his service," Lombardi said.

Francis received a hero's welcome Monday in Guayaquil, Ecuador's biggest city, as he celebrated the first public Mass of a South American tour that will later take him to Bolivia and Paraguay. He told hundreds of thousands of faithful their families are the bedrock of society but need to be supported better and strengthened.

Crowd estimates varied, with the government spokesman putting it at around 550,000 while Lombardi said it was "plausible and honest" to say 1 million people were on hand.

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?"

His words brought Janeth Valencia Bersosa to tears. The primary school teacher came to the Mass with her older sister Pilar from Cuenca, about 125 miles (200 kilometers) 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 "nontraditional" situations.

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 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.

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."

After the Mass, Francis had lunch with a group of Jesuits at a nearby high school.

A highlight was his reunion with the Rev. Francisco Cortes, a priest affectionately known as "Padre Paquito," to whom the Argentina-born pope, then the Rev. Jorge Mario Bergoglio, entrusted his seminarians on study trips to Ecuador years ago.

Returning to the capital of Quito at dusk, Francis paid a 50-minute courtesy visit to President 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.

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."

On Tuesday, Francis will return to the city's historic center to pray at the famed 18th century Church of the Society of Jesus, a gilded masterpiece of Spanish Baroque that is is on UNESCO's world patrimony list and is named for Francis' Jesuit order.