COLOMBO, Sri Lanka — Pope Francis is legendary as a man of surprise and outreach, and on a Wednesday evening in Sri Lanka he found a way to combine both, making an impromptu visit to a Buddhist temple in the country’s capital city.

While there, according to a Vatican spokesman, Francis was shown a room with a statue of the Buddha and two other holy figures in Buddhist tradition. His hosts also showed him a jar containing relics that are only opened occasionally, but which they opened for him.

There was also singing, during which the spokesman said the pope “listened respectfully.”

While not an absolute first, given that Pope John Paul II called upon a Thai Buddhist leader named Vasana Tara in a Buddhist center during a visit to Bangkok in 1984, Francis’ stop was certainly unusual.

A Vatican spokesman said that one of the Buddhist authorities who greeted Francis upon his arrival at the airport in Sri Lanka on Tuesday had invited him to drop by, and that Francis “wanted to demonstrate his friendship and positive attitude” toward Buddhists.

The unscheduled stop, which the Vatican spokesman said lasted roughly 20 minutes, came after Francis had returned from an excursion earlier on Wednesday to a Marian sanctuary in northern Sri Lanka which had been a major conflict zone during the country’s 30-year civil war.

That war conflict pitted a Buddhist majority in Sri Lanka against a Hindu minority, part of the reason that reconciliation and religious harmony have been major themes of the pope’s visit.

In a session with Buddhist, Hindu, Muslim, and Christian leaders Tuesday night, for instance, Francis insisted that “religious beliefs must never be allowed to be abused in the cause of violence and war.”

Wednesday’s surprise drop-in at the temple was especially meaningful, given the Buddhist reaction the last time a pope visited Sri Lanka, which came with John Paul’s 1995 visit.

It came shortly after John Paul II had angered Buddhists by calling their faith “in large measure an atheistic system” in an interview with an Italian journalist. Some Buddhist leaders boycotted an inter-religious meeting during that trip in protest.

The stop at the Buddhist temple was actually not the only thing Francis added to his schedule on Wednesday.

The pontiff agreed to a short courtesy call from the former president of Sri Lanka, Mahinda Rajapaksa, who had invited the pontiff to the country but lost his job in an upset shortly before Francis arrived.

Francis also wanted to have a quick get-together with the bishops of Sri Lanka, since a planned encounter on Tuesday had to be canceled due to delays in the pope’s schedule. However, when the pope arrived at the archbishop’s residence in Colombo, the bishops were not yet there, since they were delayed in getting back from the earlier papal stop in the north.

As a result, Francis opted to move on to the Buddhist temple and then saw the bishops afterward.