EAST HARLEM - Pope Francis made one of the most person-to-person appearances of his New York trip at an East Harlem school.

A line of children shrieked and chanted "Holy Father, we love you!" as he made his way along a barricade outside Our Lady of Angels School.

A beaming pope blessed them, shaking hands and posing for a few selfies. Some children embraced him, but a security guard intervened when one girl gave him a big hug.

Later they sang "When the Saints Go Marching In," changing the words to "when the pope goes marching in."

It was his third stop in a day of activities in New York.

Inside, about 150 immigrants and refugees filled the gym to greet him. He then went into a classroom, circulating around tables where grade-schoolers described projects they were working on.

Pope Francis went into an area where the 2007 closing of the parish church spurred protests. It was one of a series of church closings that the Archdiocese of New York said were spurred by dwindling congregations, demographic changes and a scarcity of priests.

The Rev. Manuel Dorantes, an assistant to the Vatican spokesman, says the pope chose to come to the school partly because it represents a mixed Latino-black community. Dorantes says it also "shows that the mission of the church continues at a place even when the church no longer continues."

The Associated Press wire services contributed to this report.