The one-day event, Rosary at the Borders, was organised by lay Catholics and endorsed by Polish Church authorities. It took place in 4,000 makeshift prayer zones and 320 churches but critics accused the gatherings of having anti-Muslim overtones.

Marek Jedraszewski, the Archbishop of Krakow in southern Poland, had said during his sermon that people should pray for “Europe to remain Europe”.

He added: “Let’s pray for other nations of Europe and the world to understand that we need to return to the Christian roots of European culture.”

Catholic leaders have rejected the criticisms, explaining that the prayer meetings commemorated the centenary of the apparitions of Fatima, when three shepherd children in Portugal said the virgin Mary appeared to them.

A woman told the BBC: “We come to the border of Poland to pray for the Poles and for the whole world.

“We want our Catholic faith to continue, to keep our children safe, that our brothers from other countries can understand that our faith is unwavering and that we feel safer, not only in Poland but also in the world.”

After Poland refused to take part in a 2015 EU deal to relocate refugees from Italy and Greece, Pope Francis used his visit last year to urge the country towards a greater acceptance of migrants.

More than 90 per cent of Poland’s 38 million citizens are Roman Catholic.