El Salvador’s first cardinal made a dramatic visit Saturday to the Nassau County jail before celebrating Masses for hundreds of Latino parishioners in Suffolk and offering a message of hope in the fight against gang violence.

Wide-eyed inmates in orange jumpsuits and sneakers turned their heads in surprise as Cardinal José Gregorio Rosa Chávez entered the East Meadow lockup’s cement-walled chapel.

Rosa Chávez, whose three-day visit to Long Island started Friday, spoke to about 50 inmates gathered for a morning service.

“I’m very happy to be here with you and share this moment with you,” the cardinal said in Spanish, as Rockville Centre Auxiliary Bishop Nelson Perez translated.

“In this jail there is a chapel,” Rosa Chávez said. “Christ lives among you.”

Sheriff Michael Sposato, who oversees the jail, called the visit — a first for a cardinal — a “great honor.”

advertisement | advertise on newsday

The male inmates “couldn’t believe it,” Sposato said afterward. “Not one person could believe there was a cardinal here.”

Two inmates were given the opportunity to address Rosa Chávez from a podium.

“We would like you to know that we are working on promoting a culture of life, brotherhood and peace behind these walls,” said one of the inmates, whose name was withheld.

Some of those behind bars, the man said, were “attempting to convert our hearts, minds and souls and to be better human beings.”

Rosa Chávez was accompanied by local church leaders, including Bishop John Barres, spiritual leader of Long Island’s 1.5 million Catholics; Perez, who was recently named bishop of the Diocese of Cleveland; and Auxiliary Bishop Robert Brennan of the Diocese of Rockville Centre.

During a second service for Spanish-speaking inmates, Rosa Chávez greeted each prisoner as they entered the chapel, asked what country they were from and gave each a brief hug.

Rosa Chávez, who long served as a parish priest, said afterward that while he hopes the jail serves as a place of rehabilitation and “conversion,” and that he also sends a message of “solidarity” to the families of victims of violence by the MS-13 gang.

The gang operates in both El Salvador and the United States, and has sent a wave of terror through Long Island’s Latino community with a string of brutal murders.

The cardinal said he and the other church leaders came to the jail “not as judges but as pastors” who he hopes will help those behind bars rethink the paths they have taken.

“You can see the joy in their faces,” he said in an interview. “It has been a morning to communicate hope.”

advertisement | advertise on newsday

Rosa Chávez repeated comments he made Friday on the first full day of his visit to Long Island that police repression of MS-13 is not the way to solve the gang problem, at least in his homeland of El Salvador.

“When a response is repressive it puts the victimizers against the wall and they become more savage, and that’s what is happening in El Salvador,” he said. “The gangs react by killing police officers and their families. That escalation indicates that is not the way to go.”

After his jail visit, Rosa Chávez went to St. John the Baptist Diocesan High School in West Islip to celebrate a Mass with several hundred people.

In comments before the service, the cardinal urged people to study more and stated how electronic devices sometimes make communication in families more difficult. He said one pastor he knows in El Salvador tells parishioners, “Shut off your phone so you can listen to God.”

Many in the crowd were thrilled to see Rosa Chávez.

advertisement | advertise on newsday

“We are so happy — we came together to see the cardinal,” said Ramona Garcia, a native of the Dominican Republic who traveled with about 20 fellow members of a parish in Port Jefferson.

Speaking in Spanish, she called Rosa Chávez “lo maximo,” or “the best.”

Jose Flores, 45, a native of El Salvador who lives in Amityville, said: “For me, it is an honor to be present with a fellow countryman.”

Rosa Chávez “is an example for everyone,” he said in Spanish, “not just for the Salvadorans but for everyone who wants to follow Christ.”

In the evening, the cardinal celebrated Mass for at least 700 people in St. Anne Roman Catholic Church in Brentwood one of the largest Latino parishes on Long Island.

Those in the packed church applauded loudly when Rosa Chávez entered St. Anne.

In remarks at the start of the Mass, he referred to the gang violence that has wracked the community and read the names of recent victims of that violence.

“I am here with the bishops to say you are not alone,” he told the congregation in Spanish.

The cardinal also said families are responsible for their children, and creating a home where there is peace.

He said it is more important for parents to spend time with their children than to make money.

During the part of the Mass in which prayers are offered, the names of some of the gang victims were again read aloud.

Rosa Chávez wraps up his visit Sunday with Masses at Our Lady of Loretto parish in Hempstead and Kellenberg Memorial High School in Uniondale.

He was invited to the Diocese of Rockville Centre to celebrate being named cardinal by Pope Francis and help address concerns over gang violence and an immigration crackdown. Long Island is home to an estimated 100,000 Salvadorans.