Paris, France - Trying to ward off the overnight cold with a blanket donated by volunteers, Muktar Ali was sleeping rough in the north of Paris when at about 4:30am, the police returned. He and several other Eritreans say they were pushed, prodded and kicked by police clearing the area.

"Police took everything I had - clothes, shoes, blanket - and threw it all away," said Ali, 33, who had fled forced conscription in Eritrea and was held captive by rebels in Libya before crossing the Mediterranean Sea to Europe. Now, he's among many refugees living on the streets of Paris, who have been subjected to displacement, detention and deportations.

Police raids, at least 30 since last June, and a cycle in which displaced people return to live in squalid camps, have angered residents and prompted them to form groups like Le Collectif La Chapelle Debout, which provide food and shelter that they say the government should be providing.

But recently, as a result of these actions, these activists have been finding themselves in criminal courts across France.

Houssam El Assimi, of Chapelle Debout, was arrested during a police raid on a Paris camp last September. Charged with "violence against persons holding public authority," he faces up to three years in prison and €45,000 (over $48,000) in fines.

Last week, his trial was adjourned until May. In the meantime, he plans to file charges against the police for using excessive force during his arrest.

He has been translating French and Arabic and helping migrants navigate the French immigration system and told Al Jazeera that he is being targeted because his group protests against the police and government policy.

El Assimi is one of several people pursued in the courts for protesting on behalf of migrants and asylum seekers or providing them with transport and shelter.

Under Article L622-1 of France's immigration law, anyone who "facilitates or attempts to facilitate the illegal entry, movement or residence of a foreigner in France shall be punished by imprisonment for five years and a fine of €30,000 (over $32,000)".

IN PICTURES: Refugee crisis 2016 - 12 countries, 12 months

Crime of solidarity

Pierre Mannoni, a 45-year-old geography professor and father of two, was arrested at a highway toll booth while driving three injured Eritrean teenage girls to Nice for medical care. He was acquitted in court, thanks to another clause stipulating that one must benefit from the transaction - a clear reference to human trafficking. But the prosecution has appealed and called for a six-month prison term.

Often referred to as the "crime of solidarity", the law has been used to prosecute people who support migrants and asylum seekers.

Rights group Gisti has documented a rise in the number of such cases going to court, and more than 100 NGOs, charities and labour unions signed a manifesto this month calling for an end to the criminalisation of humanitarian activity.

"What we're seeing is that all of the cases have one purpose," Claudia Charles, a legal expert at Gisti, told Al Jazeera. "That's to discourage any kind of support for the foreign population, be they migrants, Roma or asylum seekers."

Originally aimed at smugglers in 1945, the law was sometimes used under former President Nicolas Sarkozy's administration to prosecute those who helped immigrants.

In 2012, the new Socialist government vowed to turn the page. "Our law cannot punish those who, in good faith, want to give a helping hand," said Manuel Valls, then France's interior minister.

Human rights groups accuse the government of betraying its word and say an ever-widening range of laws are now being used to criminalise people for helping new arrivals, from the charge of assault to defamation and "insulting a public official."

"Since 2015, there's been a proliferation of cases aimed at intimidating or preventing citizens from expressing solidarity with migrants, refugees and Roma," says Marine De Hass, of the rights group, La Cimade. "It's not just article 622-1. A growing number of people are being prosecuted for helping or supporting, undocumented persons," De Hass told Al Jazeera.

Local Green councillor Jean-Luc Munro described a personal incident that took place as he was riding his bike in a Roma camp near Lille last April.

He said he was thrown off his bike after being told to stop by the police at a roadblock there, and was consequently charged with using his bicycle as a weapon to inflict "violence against a public official".

"There's been a real hardening against activists for a year and a half now," Munro told a local newspaper.

Having documented only a handful of cases against activists between 2012 and 2015, Gisti lists more than a dozen in 2016 alone, with several more going to court in the coming months.

The list is not exhaustive: both Charles and De Hass say there are probably more, unknown, cases.

Bruno Le Roux, the French interior minister, told Al Jazeera, however, that if no one profits from helping refugees and migrants, there is no "crime of solidarity". "So I can tell you that for all the cases being pursued, in court, they're cases where we believe there is a violation of the law."

The ministry has not responded to repeated requests for an explanation as to why cases are being pursued in which no personal gain is apparent. Although the Nice courts concluded as much in Mannoni's trial, the prosecution appealed his acquittal.

"It's crazy that we have reached this stage," says Mannoni. "Where I've gone to trial for helping someone who is hurt. The government is criminalising human charity."

READ MORE: Calais - Moving from the 'Jungle' to Stalingrad

Criminalising charity

The government and the city of Paris have set up new reception centres, including one in mid-January, for women and children in Ivry-sur-Seine just south of Paris.

But where shortages persist in the capital, in border towns, and Calais where the "jungle" was dismantled, volunteers are taking matters into their own hands.

No longer able to ignore the refugees and migrants lining the country roads near the Italian border, Cedric Herrou began picking them up and hosting them at his farm in La Roya Valley, near Nice.

As the tents and wooden cabins he built were not enough, he brought travellers to an old SNCF rail building that had been occupied by activists and NGOs, and where Pierre-Alain Mannoni helped three Eritrean teens.

With reinforced security at the border, following last July's massacre in Nice, asylum seekers have had difficulty getting through, and arrive in the area hungry and exhausted.

"I picked up kids who tried to cross the border 12 times," Herrou said at his trial earlier this month, where he was convicted of facilitating the entry, movement and residence of undocumented foreigners. "There were four deaths on the highway. My inaction and my silence would make me an accomplice, I do not want to be an accomplice."

Awaiting his sentence, Herrou was arrested again on January 18 on fresh charges.

His van has been confiscated and he says he'd been followed and is under surveillance. It has had little effect on the 37-year-old farmer, who smiles broadly in photos, surrounded by kids from Sudan and Eritrea.

"Whatever happens, I'll continue," he said before his second arrest.

"It's astonishing that human smugglers continue to pass through, the real smugglers who get rich on the backs of others, while humanitarians are harassed in this way," Herrou's lawyer, Me Zia Oloumi, told Al Jazeera by phone.

"The authorities can't control the borders so they're putting pressure on people in the valley to discourage them from supporting migrants, by detaining people and putting them on trial."

READ MORE: Burying refugees who die in the Calais 'Jungle'

The divisive issue

The humanitarian crisis on Europe's doorstep and resulting influx of refugees, migrants and asylum seekers, have divided the country, and few places encapsulate the dilemma better than La Roya Valley - a rugged, mountainous crossroads taken by asylum seekers bent on heading north, undetected.

In December, a local rights group, Roya Citoyenne, filed a formal complaint, accusing the authorities of failing to honour their obligation to look after unaccompanied child refugees, saying on their website that "these minors are suffering intensely and risk death on the roads".

The next day, Eric Ciotti, president of Alpes-Maritimes Department, denounced "a handful of activists …blinded by a far-left ideology," for organising the "clandestine entry of foreigners across the French-Italian border".

Then, he assailed Herrou, whose rescue efforts and indifference to prosecution have made him a local hero and the bane of local police.

"Who can say with certainty that of the hundreds of migrants that Mr Herrou has proudly brought across the border," Ciotti wrote, "there isn't hidden among them, a future terrorist?"

Similar divisions are playing out in the national arena, during the run-up to the presidential elections in April and May.

Protests have erupted both in defence of migrant rights, but also, in some towns, against the opening of new shelters for asylum seekers.

While some candidates on the left say France should do more to welcome refugees and unaccompanied minors, the far right says the country is already doing too much.

Despite taking just a fraction of the numbers being welcomed by Germany, conservative frontrunner Francois Fillon says France cannot afford to take in any more asylum seekers than it already is.

Those who resist the hard line on immigration feel they are being worn down in the courts.

"They're trying to ruin us financially because it costs a lot to prepare for trial," El Assimi said at the Paris high court. He estimates he's spent more than 5,000 euros (over $5,300) in legal costs so far.

"Their strategy is to exhaust us. And it's working."

OPINION: Compassion of the many - Indifference of the few