VATICAN CITY (CNS) — Prayer is a key that opens the door to God, unlocks selfish, fearful hearts and leads people from sadness to joy and from division to unity, Pope Francis said on the feast of Sts. Peter and Paul.

Prayer is “the main way out: the way out for the community that risks closing up inside itself because of persecution and fear,” he said during a Mass in St. Peter’s Basilica June 29.

Prayer — entrusting oneself humbly to God and his will — “is always the way out of our personal and community’s closures,” he said.

Twenty-five archbishops appointed over the course of the past year were invited to come to Rome to concelebrate the feast day Mass with Pope Francis. They came from 15 countries.

Among those invited to concelebrate were Archbishops Bernard A. Hebda of St. Paul and Minneapolis; Francisco Moreno Barron of Tijuana, Mexico; Juan Garcia Rodriguez of Havana; and Kenneth Richards of Kingston, Jamaica. Of the new archbishops, 11 were from the Americas, 10 from Europe and one each from Asia, Africa, Oceania and the Middle East.

Like last year, the pope did not confer the pallium on new archbishops during the liturgy, but rather, blessed the palliums after they were brought up from the crypt above the tomb of St. Peter. The actual imposition of the woolen band was to take place in the archbishop’s archdiocese in the presence of his faithful and bishops from neighboring dioceses.

The pallium is a woolen band that symbolizes an archbishop’s unity with the pope and his authority and responsibility to care for the flock the pope entrusted to him.

In his homily, the pope said when Jesus promised Peter the keys, it was a symbol of his ability to open the kingdom of heaven, not lock it up like the hypocritical scribes and Pharisees did to those seeking to enter.

The day’s first reading, from Chapter 12 of the Acts of the Apostles, the pope said, speaks of different kinds of closure: Peter being locked up in prison and a group of faithful gathered inside a home in prayer and in fear.

After God sends an angel to free Peter from his captors, the apostle goes to the house of a woman named Mary, and knocks on the door. Though many people are gathered inside in prayer, they are unsure about opening the door, unable to believe Peter is really outside knocking to be let in, Pope Francis said.

King Herod’s persecution of Christians created a climate of fear, the pope said, and “fear makes us immobile, it always stops us. It closes us up, closes us to God’s surprises.”

This temptation is always out there for the church, even today, to close itself up in times of danger, he said.

However, prayer offers “the grace to open up a way out: from closure to openness, from fear to courage, from sadness to joy. And, we can add, from division to unity,” he said, noting the customary presence at the Mass of a delegation from the Ecumenical Patriarchate of Constantinople.

This year, the delegation was led by Greek Orthodox Metropolitan Methodios of Boston. He joined the pope at the end of the Mass to pray together under the main altar over St. Peter’s tomb.

A Lutheran choir from Germany and an Anglican choir from Oxford sang with the Vatican’s Sistine Chapel Choir during the Mass.

During his Angelus address, the pope said Sts. Peter and Paul, who are the patrons of the Vatican and the city of Rome, are “two columns and two great lights that shine not only in Rome’s sky, but in the heart of the faithful in the East and West.”

Peter and Paul came to Rome from the Holy Land to preach the Gospel, he said. Out of their love for God, they left their homes, endured a long and difficult journey and faced great risk and suspicion.

If Christianity is a living and fundamental part of Rome’s spiritual and cultural heritage, the pope said, it’s thanks to “the apostolic courage of these two sons of the Near East.”

The saints’ feast day, which is a holiday in Rome, reminds people of the continued presence of Peter — a humble fisherman — and Paul — a great teacher — and how even today they “knock on the doors of our homes, but especially our hearts.”

“Once again they want to bring Jesus, his merciful love, his solace, his peace” to everyone, he said.

Pope Francis asked those gathered in the St. Peter’s Square to let the “candid and firm faith of Peter and the great and universal heart of Paul help us be joyous Christians, faithful to the Gospel and open to encountering everyone.”