Norbert Valley was surprised to see police show up at a Sunday morning service at the evangelical church in Switzerland where he is pastor.

He was even more perplexed when the officers told him he had broken the law by allowing a migrant who did not have the right to remain in the country to sleep there.

Pastor Norbert Valley. Reseau evangelique suisse

Valley, 63, was given a suspended fine of 1,000 francs ($1,016) and ordered to pay 250 francs ($253) in legal fees. The pastor was told he would not have to pay the penalty if he stopped helping people in similar circumstances — a promise Valley said he could not make.

“If I find myself in the same situation, I cannot not help,” he said, explaining that it was his duty as a Christian to help those in distress. "If we don’t help our neighbors, we lose our humanity."

Valley is far from the only person whose moral compass has put them on the wrong side of the law amid Europe's migrant crisis.

Many know they are breaking the law. But some question whether being punished for what they see as acts of human solidarity is just.

Valley, who was fined in August, is appealing and preparing to fight his case in court.

His case comes as aid workers and volunteers across Europe allege that harassment from authorities has made it increasingly difficult to do their jobs.

Other recent incidents include:

Domenico Lucano, the mayor of the southern Italian town of Riace, was placed under house arrest this month on suspicion of facilitating illegal migration. He was accused of arranging “marriages of convenience” to allow migrants to remain in Italy, among other charges.

A Belgian journalist who works for Marie Claire magazine has been accused of human trafficking and of participation in a criminal organization. Anouk Van Gestel, 62, is one of 12 defendants who are due to appear in court next month. She admits that she tried to help a 16-year-old from Sudan travel from Belgium to Britain illegally, but insists it was for humanitarian reasons. “I didn’t receive one cent,” she said. Van Gestel said her case "has nothing to do with rights and justice — it is just political."

Cédric Herrou, an olive farmer from southeast France, was first detained in 2016 for helping eight people cross from Italy into the country. He has since aided hundreds more as they made similar journeys, including many unaccompanied children. Herrou has been detained nine more times for transporting migrants through France and housing them at a makeshift camp. Last year, he was given a four-month suspended sentence. In July, a court ruled that the "principle of fraternity" should have shielded Herrou, 39, from prosecution.

Judith Sunderland, the associate director for Human Rights Watch’s Europe and Central Asia division, said such good Samaritans and aid workerswere "people who are doing for the most part really great work in keeping with the founding values" of the European Union.

“It’s devastating to see what feels more and more like a pattern of attacks on these groups and on individuals, and efforts to delegitimize what should be seen as very laudable work," she added, describing them as the "best of Europe."

'Completely vilified'

The Mediterranean Sea is perhaps the most visible arena in which aid groups say their work is being restricted by governments for political reasons.

In August 2017, the Iuventa rescue ship was seized by Italian authorities under suspicion of providing "assistance" to illegal migrants and collusion with smugglers.

It was first of several incidents in which rescue boats were detained by Italian and Maltese authorities for charges ranging from illegally aiding migrants from Libya to not being properly registered.

These cases, combined with the decision by Italy and Malta to bar such vessels from allow migrants to disembark on their soil, have effectively halted rescue operations in the central Mediterranean.

Meanwhile, migrants trying to cross the Mediterranean died or went missing at the highest rate ever recorded in September, with one in five lost at sea, according to the Italian Institute for International Political Studies.

Italian Interior Minister Matteo Salvini says the restrictions exist to prevent Italy from becoming complicit with traffickers who send migrants out to sea knowing that they will have to be rescued. Italy, he said, was saying "no to the business of clandestine immigration."

But rescue organizations insist that there is no collusion with traffickers and that Italian lawmakers were attempting to damage their reputations for political purposes.

“While initially we were really seen as savers of life, we have now been completely vilified,” said Hassiba Hadj-Sahraoui, a humanitarian affairs adviser at Médecins Sans Frontières (MSF) — which is also known as Doctors Without Borders.

The case against Lucano, the Italian mayor known for welcoming thousands of asylum-seekers, prompted supporters to take to the streets in protest. They said saying his actions had breathed new life into a town that had struggled economically but was a model of immigrant integration.

Mayor Domenico Lucano. Franck Iovene / AFP - Getty Images

Roberto Saviano, a writer on organized crime, said Lucano had been targeted for “assuming the responsibility that should have been assumed by an entire nation.”

“Matteo Salvini’s plan is coming off. Solidarity is becoming a crime,” he said in a video message posted on Twitter.

But Italy is not the toughest European state on the issue. In June, Hungary passed a package of bills that criminalized helping illegal immigrants. Under the new laws, even those who help people to submit asylum requests risk imprisonment.

Fear

In France, humanitarian organizations say they have documented widespread harassment of aid workers in places like Calais, where the migrant camp known as The Jungle once stood.

“We’re hearing about activists facing all sorts of daily harassment, police checks, aggressive ticketing of parked cars, traffic violations,” said Human Rights Watch's Sunderland.

Hadj-Sahraoui, of MSF, said the targeting of aid workers contributed to the "hostile environment" many E.U. governments were creating for asylum-seekers in an effort to prove that they were tough on migration. "The anti-migration discourse is seen as an easy way to win elections," she explained.

But Herrou, the French olive farmer, said it was his moral obligation to help those in danger. “It’s much worse to leave a child all alone on the side of the road than to put them in your car and take them across the border,” he said.

Cedric Herrou prepares a meal for migrants at his home in Breil-sur-Roya, France, in April 2017. Eric Gaillard / Reuters file

Herrou believes French authorities were attempting to make citizens afraid both of migrants and of providing them with help.

Jeff Crisp, a refugee expert at Britain's University of Oxford, said that, while anti-smuggling and trafficking laws are important, there should be an exemption for aid workers and good Samaritans. He maintained that individuals such as Herrou don't represent a threat to the state.

Robin Bronlet, a lawyer for three of the people accused in the Belgian case, said the arrests had been the latest attempt by populist lawmakers to prove they're cracking down on migration.

“They really want to show their electorate that they’re doing everything possible to show migrants that they are not welcome in Belgium so they might go elsewhere,” he said.