Pope Francis on Friday combined tough talk and tenderness, joy and somberness, and a dose of grandfatherly warmth as he crisscrossed Manhattan using his growing global celebrity to highlight issues of climate change, immigration, poverty, inequality and the “deafening anonymity” of those on society’s margins.

At the United Nations, Francis unleashed a full-throated challenge to world leaders to combat climate change in the name of the world’s most powerless. At Ground Zero, he was a gentle prophet renouncing fanaticism and pleading for peace in a voice barely louder than a whisper.

And at a Catholic elementary school in East Harlem, he played genial “abuelo” to scores of mainly Latino and immigrant children, telling them a sweet but powerful fable about immigration and how communities are strengthened by embracing change without fear. One child told the 78-year-old pontiff, in Spanish, that he also was from Argentina, the pope’s homeland, while another said he followed the pontiff on Instagram.

Francis then paraded through Central Park to the cheers of an estimated 80,000 who had waited many hours to see him. And he finished his second day in New York by celebrating a rousing Mass for 19,000 people in Madison Square Garden.

At Mass, Francis urged the faithful to be always aware of God’s “great light” of hope, even in the darkest moments. He again returned to a constant theme of his preaching, of the need to lift up the neediest and most vulnerable. Standing in the center of one of the world’s biggest cities, with its vast chasm between rich and poor, Francis spoke of the hidden isolation of dense urban areas.

Pope Francis was welcomed by cheers and requests for selfies on Friday as he arrived to Our Lady Queen of Angels School in East Harlem during his six-day U.S. visit. (Reuters)

“In big cities, beneath the roar of traffic, beneath ‘the rapid pace of change,’ so many faces pass by unnoticed because they have no ‘right’ to be there, no right to be part of the city,” he said. “They are the foreigners, the children who go without schooling, those deprived of medical insurance, the homeless, the forgotten elderly. These people stand at the edges of our great avenues, in our streets, in deafening anonymity.”

He urged the crowd to “go out and proclaim, go out and show that God is in your midst” and share the “bright light” of God and the “hope which makes us see, even in the midst of smog, the presence of God as he continues to walk the streets of our city.”

Near the end of the Mass, prompted by Archbishop Timothy M. Dolan, the crowd gave Francis a sustained, whooping, cheering standing ovation.

Francis continued with the closing prayers, then he said to the gathered faithful, “Please, don’t forget to pray for me.”

The pope began his day, his fourth on a six-day U.S. tour, at the United Nations, where he urged world leaders to replace “solemn commitments” with “concrete steps” to tackle climate change.

In the address to the U.N. General Assembly, his first as pontiff, Pope Francis touched on a litany of international issues, including nuclear proliferation, drug trafficking and slave labor. But he dwelled most on the need to preserve the world’s ecological system, warning that further damage perpetuates “today’s widespread and quietly growing culture of waste.”

“Any harm done to the environment, therefore, is harm done to humanity,” Pope Francis said in his native Spanish from the lectern inside the General Assembly, an audience of world leaders seated before him.

What Pope Francis said, what Americans think

“The misuse and destruction of the environment are also accompanied by a relentless process of exclusion,” he said. “In effect, a selfish and boundless thirst for power and material prosperity leads both to the misuse of available natural resources and to the exclusion of the weak and disadvantaged.”

“The poorest,” the pope said, “are those who suffer most from such offenses.”

He then visited the site of the Sept. 11, 2001, attacks in Lower Manhattan, where he said grief remains “palpable.”

He met with relatives of emergency personnel who were among the nearly 3,000 people who died after two airplanes struck the World Trade Center.

At the spot where the towers once stood, Pope Francis spoke of pain and suffering, “a pain which still touches us and cries out to heaven.” But in remarks to a gathering of religious leaders, he also spoke of “heroic goodness,” praising the firefighters who “walked into the crumbling towers, with no concern for their own ­well-being.”

“Many succumbed; their sacrifice enabled great numbers to be saved,” he said. “This place of death became a place of life, too — a place of saved lives, a hymn to the triumph of life over the prophets of destruction and death.”

Dense crowds packed the 9/11 memorial in Lower Manhattan as the pontiff walked between the two pools that mark the site of the fallen North Tower and South Tower with an entourage that included Dolan.

Some had waited hours to see the pope. Ariana Vigiano, 16, and her mother, Maria Vigiano-Trapp, 50, had arrived by 7:30 a.m., traveling from their home on Long Island. Both said they were hoping the pope would fortify their faith in God, which was shaken after Vigiano’s father, John, a New York City firefighter, died trying to rescue people from the World Trade Center.

“I’m still trying to get a little bit of closure,” Vigiano said. “I’m hoping he will say something that will really speak to me and help me feel really spiritual and try to get me in touch with my father.”

The pope met with representatives from 10 families who lost loved ones, spending at least 10 minutes talking and handing out rosaries. He then descended to the lower level of the Ground Zero museum for an interfaith ceremony in the soaring Foundation Hall.

Shortly before the pope’s U.N. address, Washington’s political class was shaken by news that House Speaker John A. Boehner (R-Ohio) will resign at the end of October. The announcement came one day after Boehner, who is Catholic, welcomed the pope to the U.S. Capitol. Before revealing his plans at a meeting of House Republicans, Boehner tweeted photographs of himself with Francis under the words: “What a day.”

In the afternoon, when the pope arrived in East Harlem at Our Lady Queen of Angels Catholic Elementary School, where nearly 70 percent of the children are Hispanic, Francis high-fived the students and noted that some of them were from “other places, even from other countries.”

“That is nice!” he said in his native Spanish. “Even though I know that it is not easy to have to move and find a new home, new neighbors and new friends. It is not easy. At the beginning it can be hard, right? Often you have to learn a new language, adjust to a new culture, even a new climate. There is so much to learn!”

At nearly every stop on his U.S. trip — most notably with President Obama at the White House, and his address to the U.S. Congress — Francis has stepped directly into the highly charged political debate over immigration, urging an open embrace of immigrants, especially those coming to the United States from Central and South America.

With the children, the 78-year-old pontiff again argued — albeit in the form of a children’s story — that newcomers make a society stronger.

“The good thing is that we also make new friends, we meet people who open doors for us, who are kind to us,” Francis told the children. “They offer us friendship and understanding, and they try to help us not to feel like strangers — like foreigners. To feel at home. . . . School then ends up being one big family. One where, together with our mothers and fathers, our grandparents, our teachers and friends, we learn to help one another, to share our good qualities, to give the best of ourselves, to work as a team and to pursue our dreams.”

The pope toured a classroom, speaking to students in both English and Spanish.

“Yo soy de Argentina cómo usted,” said one boy in a purple school uniform, telling the pope he was also from Argentina.

He held hands with two students who led him to an interactive computer screen, where a project had been prepared called “Thanking God for the gifts of the Earth.” They showed him how to use a finger to drag icons around on the screen. The pope tried, without much luck, until one of the students held his hand to help him.

Francis prayed the Hail Mary and the Lord’s Prayer with the children, and he received gifts of a cross, and a soccer ball and jersey from a young man who showed the pontiff his fancy footwork first. He accepted a tool belt and hard hat from a representative of a workers union with immigrant members.

He told the students, in Spanish, that he was assigning them homework: “Pray for me, so that I can share with many people the joy of Jesus.”

“Don’t forget the homework!” he said in English as he left.

“Holy Father, we love you!” the schoolchildren chanted as he got into his Fiat. “Holy Father I follow you on Instagram,” one student told the pope, who smiled and gave the peace sign with his two fingers.

On Saturday morning, Pope Francis is scheduled to travel to Philadelphia, where his stops will include the Cathedral Basilica of Saints Peter and Paul in Center City, Independence Hall and a correctional facility.

The pope flies back to Rome on Sunday.

Michelle Boorstein, Pamela Constable, Sarah Pulliam Bailey, Terrence McCoy and Julie Zauzmer contributed to this report.