Pope Francis celebrated an historic Mass at the Madison Square Garden sports arena in Manhattan before about 20,000 worshipers.
In his homily, Francis said the "people of God" are called upon to contemplate "the great light" of God's presence among them.
The mass ended a busy day in New York. The pontiff urged attendees to reject self-absorption and remember the needy.
The atmosphere inside the Garden was absolutely electric and almost raucous at times. VOA's Alexis Christoforous was at the Mass, and she described Pope Francis as a rock star, with people standing, cheering, whistling and chanting "Viva il Papa." She said many wept with tears of joy during his homily.
Cardinal Timothy Dolan, Archbishop of New York, thanked the pope for visiting the city. The crowd enthusiastically jumped to its feet and gave Francis a standing ovation that continued for several minutes. The audience seemed quite reluctant to let the pope leave.
Massive crowds turned out earlier to see the 78-year-old pontiff ride through Central Park in his popemobile as he waved to thousands of screaming and applauding people ahead of the Mass.
Earlier, he visited Our Lady Queen of Angels School in East Harlem.
At the school he spoke to students in Spanish, looked at their projects and told them school can become a second home.
United Nations visit
Friday morning, in an address to the U.N. General Assembly, Pope Francis exhorted presidents and prime ministers to show leadership in combating climate change and poverty and in protecting refugees fleeing conflicts.
Earlier, at the United Nations headquarters in New York, the pope tied "misuse and destruction of the environment" with what he called the "relentless process" of economic and social exclusion of disadvantaged members of society.
"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," Francis said in Spanish to the dignitaries seated before him in the General Assembly chamber.
He urged government leaders to take concrete steps "for preserving and improving the natural environment and thus putting an end as quickly as possible to the phenomenon of social and economic exclusion, with its baneful consequences: human trafficking, the marketing of human organs and tissues, the sexual exploitation of boys and girls, slave labor, including prostitution, the drug and weapons trade, terrorism and international organized crime."
Francis also appealed to the world leaders to "work tirelessly to avoid war," which he called "the negation of all rights and a dramatic assault on the environment."
Citing conflicts in "the entire Middle East, North Africa and other African countries," as well as in Ukraine, he urged the international community, "particularly through the norms and mechanisms of international law, to do all that it can to stop ... further systematic violence against ethnic and religious minorities’ and to protect innocent peoples."
Applause interrupted the pontiff's lengthy speech, especially when he spoke of the need to protect the environment, aid the poor and educate girls. Before the pope's arrival, the great hall had a festive atmosphere, with diplomats greeting one another at the start of the annual meeting. Some were taking selfies, others chatted jovially.
9/11 memorial visit, multifaith service
From the United Nations, the Roman Catholic Church leader traveled to the National September 11 Memorial, the site where the World Trade Center once stood. He greeted relatives of some of the people killed in the terrorist attacks on New York City in 2001. Nearly 3,000 died in attacks on that day in New York, Washington and Pennsylvania.
At an interfaith meditation service, Francis prayed for peace for all victims of the September 11 attacks, and healing for the family members and friends they left behind. Addressing God, he said, "Bring your peace to our violent world."
The pope stood with representatives of other faiths – Muslim, Jewish, Buddhist, Hindu and more – who offered prayers and song to commemorate the memory of those who died and to appeal for peace for all.
Echoes of congressional speech
The pope's U.N. address echoed similar concerns he'd raised in a Thursday address to a joint meeting of the U.S. Congress in Washington. He focused heavily on climate change, migration and immigration, but he also reiterated the church's concerns for the sanctity of life.
Rich nations have a moral obligation to aid the vulnerable, Francis suggested in discussing "the creation and distribution of wealth."
He also urged showing compassion, not closing doors or borders, to cope with the worst refugee crisis since World War II.
Praise for nuns
Francis flew late Thursday afternoon from Washington to New York, where he began his visit to the nation's financial center with a prayer service at St. Patrick's Cathedral on posh Fifth Avenue.
There, he gave a special shout-out to American nuns, offering his "esteem and gratitude."
Calling them "women of strength, fighters, with that spirit of courage which puts you on the front lines in the proclamation of the Gospel," Francis said he wished "to say thank you, a big thank you... and to tell you that I love you very much."
The main group representing American nuns, the Leadership Conference of Women Religious, had been the subject of a seven-year Vatican investigation over accusations that it had overemphasized social justice work and pushed "radical feminist themes incompatible with the Catholic faith."
The Vatican and LCWR resolved their differences in April.
On to Philadelphia
The pope plans to leave New York Saturday morning for two days in Philadelphia, his final U.S. stop.
There, he'll attend the Vatican-sponsored World Meeting of Families and, on Sunday, will celebrate an outdoor Mass expected to draw nearly 2 million people.
VOA's Alexis Christoforous contributed to this report from New York.