By visiting Lesbos, the pope is making his strongest statement yet on migrant rights, an issue he has made perhaps the single most important of his revolutionary tenure. (Griff Witte,Jason Aldag/The Washington Post)

For the hundreds of thousands of desperate migrants who have made landfall on this verdant jewel in the Aegean Sea over the past year, there had been only two ways off the island: a ferry bound for a new life deeper in Europe or a deportation order that led straight back across the sea.

But that was before Saturday, when Pope Francis whisked in and pioneered a third: a ride with him on a jet bound for Rome.

The Pope’s visit to the Greek island of Lesbos had already been emotional, provocative and deeply symbolic before he gave it a dramatic and unexpected twist in its closing minutes on Saturday.

But when he boarded his Alitalia return flight along with 12 Syrians — including six children — who had lost their houses to bombs, the gesture offered the most vivid illustration yet in the pope’s quest to prick Europe’s conscience over its treatment of refugees.

“May all of our brothers and sisters on this continent, like the good Samaritan, come to your aid in the spirit of fraternity, solidarity and respect for human dignity,” Francis told a group of hundreds of asylum seekers during a visit to the island’s migrant detention facility.

Journey alongside refugees through Lesbos, the gateway to a new life

Hours later, in a life-changing moment for a dozen among the tens of thousands of migrants stranded in Greece by Europe’s closed borders, he acted out his counsel that refugees be embraced, not shunned.

The plan to bring three refugee families to the Vatican, the pope told journalists during his flight back from Lesbos, was a “last-minute” inspiration that came together last week. Although all three families were Muslim, he said, they had not been selected based on faith but based on their eligibility.

As late as Friday night, officials in Lesbos had still been sorting out who would accompany the pope, and even turned to chance — selecting names from a box — to narrow the field.

“We wanted to be fair to everyone,” said Stavros Mirogiannis, director at the Kara Tepe camp where the 12 Syrians had lived until they relocated to Vatican City. “They won the lottery. Today is the best day of their lives.”

Francis said that once they arrive and settle in, they will be given assistance to find work.

“Everything was arranged according to the rules,” the pope said. “They have their documents. The Holy See, the Greek government and the Italian government have checked everything.”

Asked about Europe’s plan to shut down the migrant waves by sending people back to Turkey, the pope called on Europe to implement policies that welcome migrants, give them jobs and integrate them. Francis said he understood that some governments and people are afraid, but that it did not lift from them a “responsibility of welcome.”

It was a more direct critique than he had offered while on Lesbos. But just by visiting the island that has been the primary gateway for refugees to Europe — and that just two weeks ago was the scene of hundreds of deportations — he was making a dramatic statement.

Upon Francis’s arrival Saturday at the tiny Lesbos airport, Greek Prime Minister Alexis Tsipras called the visit “historic,” saying that it came at a time when “some of our partners — even in the name of Christian Europe — were erecting walls and fences to prevent defenseless people from seeking a better life.”

The centerpiece of Francis’s visit was a tour of the Moria detention facility, where he sat down for lunch with some of the 3,060 men, women and children who are held in overcrowded conditions awaiting a likely deportation order.

The pope was given a hero’s welcome, with people cheering, clapping and whistling as he shook hands one by one with residents who had lined up to greet him. Some held signs praising Francis and pleading for his help.

“Welcome to Moria,” many people told him as they clasped his hand. The pope smiled broadly in reply.

As he made his way through the camp — surrounded by high fences and patrolled by police — children handed him their drawings. He complimented them on their artistry.

“Don’t fold it. I want it on my desk,” he told a young girl. When greeting observant Muslim women, scarves pulled over their hair, he placed his hand atop his heart and gently bowed.

Several people knelt at his feet, weeping uncontrollably. Periodic chants of “Freedom! Freedom!” broke out in the crowd, punctuated by the cries of babies and young children.

“We hope that the world will heed these scenes of tragic and indeed desperate need, and respond in a way worthy of our common humanity,” Francis told hundreds of migrants who had gathered beneath a plastic, pre-fabricated tent to hear him speak. He had come, he said, to tell the Moria residents that “you are not alone.”

In an important symbol of reconciliation within the Christian faith, the pope was accompanied by Ecumenical Patriarch Bartholomew, the spiritual leader of the world’s Orthodox Christians, as well as by Greek Archbishop Ieronymos II.

In remarks to the migrants at Moria, Ieronymos denounced government policies that “have brought these people to this impasse.”

Bartholomew vowed to “do everything to open the eyes and hearts of the world.”

“The world will be judged by the way it has treated you,” he said.

Later, in a ceremony in the main port of Lesbos, the three men threw laurel wreaths into the sea in remembrance of the thousands who have died making the voyage to Europe.

In the port, the pope gave a speech on the exact spot where, less than two weeks ago, the European Union’s Frontex border officers escorted migrants to waiting ferries that returned them across the sea to Turkey.

Francis urged the world to resist the temptation to build walls. He also thanked Lesbos residents — and people across Greece — for keeping “open their hearts and doors.”

“Many ordinary men and women have made available the little they have and shared it with those who lost everything. God will repay this generosity,” he said.

The surprise ending to the visit featured two families from Damascus and one from Deir al-Zour in an area of Syria controlled by the Islamic State. The Vatican said the families had arrived in Greece before the E.U.’s plan to deport people back to Turkey took effect. The Catholic Sant’Egidio community will take care of the refugees as they settle in, the Vatican said.

It is unclear whether Francis’s statements on Saturday will have any meaningful effect on Europe’s refugee debate. E.U. officials have expressed satisfaction that the number of arrivals has fallen precipitously in recent weeks — from dozens of boats a day to one or two.

But the pope’s message was clear.

“He is telling Europe that it is denying its Christian roots when it turns its back on those in need,” said Thomas J. Reese, senior analyst with the National Catholic Reporter. “He is telling Europe that Jesus would not close the doors to those fleeing war and persecution.”

As night fell at the detention center on Saturday, residents said most had appreciated what the pope had to say.

Rehan Ahmed, a 25-year-old Pakistani detainee who faces the threat of deportation, said expectations in advance of the visit had been sky-high.

“Everyone was hoping that the pope would come and announce that he was opening the borders,” said Ahmed, speaking from behind the barbed-wire that marks the center’s boundary.

When the Pope offered no concrete change in Europe’s policies, some at Moria were disappointed. But most, he said, were simply grateful for Francis’s “message of love.”

“He’s with us,” Ahmed said, “and that’s enough.”

Faiola reported from Berlin.