Pope Francis thanked Greece for its "gracious hospitality" as he left Monday following a landmark three-day visit marked by calls for better treatment of migrants in Europe.

Before setting off, the pope met young people in a Catholic school on the outskirts of Athens, urging openness.

"When the temptation to close in on ourselves comes, look for others," he said.

In a joyful atmosphere, punctuated by religious songs from the youth, he stressed the need to open up to others, "especially those who need" them.

"When you are tempted to close in on yourself, you look for others," he urged them.

Pope Francis has long championed the cause of migrants
Pope Francis has long championed the cause of migrants POOL via AFP / Louisa GOULIAMAKI

Addressing three young people, Katerina, Ioanna and Aboud, who shared their "doubts" or their own experience with faith, the Pope said he felt that "devoting oneself to others is not for the losers, it's for the winners!"

The pontiff, who has sought to reach out to young people, noticed that "many people today are constantly using social media, but are not themselves very social: they are caught up in themselves, prisoners of the cell phone in their hand".

"What appears on the screen is not the reality of other persons: their eyes, their breath and their hands," the pontiff tried to convince an audience of mainly teenagers.

The pope visited migrants at the Mavrovouni camp on the island of Lesbos and told them he was trying to help them
The pope visited migrants at the Mavrovouni camp on the island of Lesbos and told them he was trying to help them VATICAN MEDIA via AFP

"The screen can easily become a mirror, where you think you are looking at the world, but in reality you are all alone," he warned.

Addressing Aboud Gabo, an 18 year old Syrian who described his "perilous journey to Greece" after having fled the war in Aleppo, the Pope called on him, like Telemachus in the Odyssey, not to be "paralysed" by his fears.

"Dream big and dream together... Nourish the courage of hope", said the Pope.

Earlier in the day, he also held brief talks with the head of parliament, Konstantinos Tassoulas, and with the leader of the main opposition party, Alexis Tsipras, who thanked him for "his unwavering defence of human rights and social justice".

The pope's visit came after he delivered a stinging rebuke to Europe which he said was 'torn by nationalist egoism'
The pope's visit came after he delivered a stinging rebuke to Europe which he said was 'torn by nationalist egoism' AFP / MANOLIS LAGOUTARIS

One day before, on the island of Lesbos, Francis, an ardent defender of migrants, denounced Europe's migrant crisis as a "shipwreck of civilisation" in an impassioned speech at the camp in Mavrovouni.

In 2016, Francis visited the sprawling Moria camp on Lesbos, when the island was the main gateway for migrants heading to Europe.

On Sunday, he was warmly welcomed by a crowd of migrants at the camp, which houses nearly 2,200 asylum seekers.

People later gathered in a tent to sing songs and psalms to the pontiff, who listened to them, visibly moved.

"I am trying to help you," Francis told one group through his interpreter.

The Mavrovouni camp was hurriedly erected after Moria, then the largest such site in Europe, burned down last year.

In his speech, Francis warned that the Mediterranean "is becoming a grim cemetery without tombstones" and that "after all this time, we see that little in the world has changed with regard to the issue of migration".

The root causes "should be confronted -- not the poor people who pay the consequences and are even used for political propaganda", he added.

According to the International Organization for Migration, 1,559 people have died or gone missing attempting the perilous Mediterranean crossing this year.

Before arriving in Greece, the pope visited Cyprus, where authorities said that 50 migrants will be relocated to Italy thanks to Francis.

The 84-year-old pope is himself from a family of Italian migrants who settled in Argentina.

Following his visit to the migration flashpoint, he celebrated mass on Sunday for some 2,000 faithful in Athens, where he urged respect for the "small and lowly".

At the airport on Monday, he invoked "God's blessings upon the (Greek) Nation", before departing to Rome. He is expected to give a press conference onboard.