French President Emmanuel Macron’s proposal to toughen up the country’s handling of immigrants has sparked opposition from rights groups and even a revolt from members of Macron’s own party, who criticized the new measures for going too far.

The bill unveiled Wednesday tightens up deadlines in the process for seeking asylum while doubling the period of time migrants can be detained. It also makes illegal border crossing a crime punishable by up to a year in jail and a $4,600 fine.

The government proposal is “playing with people’s fears,” said Sonia Krimi, a member of parliament from Macron’s own party, En Marche, during parliamentary debate, according to Reuters. “Not all foreigners in France are terrorists. Not all foreigners cheat with social welfare.”

Macron, who swept to power last year against an the avowedly anti-immigrant, far-right leader Marine Le Pen, defended the bill as combining “efficiency” with “humanity.”

“It's a well-balanced law,” French Interior Minister Gerard Collomb told a press conference, according to Agence France-Presse. “It is absolutely necessary that countries like Germany, France, Italy, the Netherlands and Sweden have the same type of procedures.”

Like much of Western Europe, France has seen its fair share of controversy in its struggle to cope with an unprecedented refugee crisis. A report last summer by Human Rights Watch entitled “Like Living in Hell” documented conditions in a notorious migrant camp dubbed the “Calais Jungle,” and accused French police of “attacking migrants.”

A record 100,000 people filed asylum applications in France last year, though the country ultimately offered refugee status to around 30,000 people. Nearly 15,000 people were forcibly expelled from France during the same period, according to AFP.

Rights groups slammed Macron’s latest proposal as overly harsh, and said the shorter application window would make it harder for migrants and refugees to exercise their rights.

“We're not even in favor of fighting for changes to the bill, because the philosophy behind it is just too repressive,” the Cimade migrants’ charity said. “We're asking for it to be withdrawn.”