BUCHAREST, Romania — Pope Francis, on the last day of his trip to Romania, on Sunday asked for forgiveness on behalf of his church for the suffering endured by the Roma people, saying his heart was “weighed down by the many experiences of discrimination, segregation and mistreatment” they have experienced.

The pope offered the apology at a newly consecrated church in a poor neighborhood of Blaj, a city in Transylvania, where a priest of Roma ethnicity welcomed him “to the periphery of the peripheries.”

“History tells us that Christians too, including Catholics, are not strangers to such evil,” Francis said. “I would like to ask your forgiveness for this. I ask forgiveness — in the name of the church and of the Lord — and I ask forgiveness of you, for all those times in history when we have discriminated, mistreated or looked askance at you.”

This was his first trip to Romania — and the first by a pontiff since John Paul II visited 20 years ago — and Francis sought to mend relations between the Roman Catholic and Eastern Orthodox churches. He also took the opportunity to advocate for millions of Romanian emigrants, to hearten the country’s small Catholic population and to again position himself as a counterbalance to the tip toward nationalism around the world.