The French parliament has passed legislation toughening France’s immigration policy after months of political wrangling.

The amended bill was backed by both President Emmanuel Macron’s centrist Renaissance party and Marine Le Pen’s far-right National Rally (RN).

The vote divided Mr Macron’s party, and the health minister Aurélien Rousseau announced he was going to resign.

Left-wing parties accused Mr Macron of making concessions to the far right

A previous draft was rejected by parliament last week, by National Rally as well as the left. In response, the government redrafted the bill, making some of its provisions tougher.

The new legislation makes it more difficult for migrants to bring family members to France and delays their access to welfare benefits.

It also bans detaining minors in detention centres.

A controversial provision discriminates between citizens and migrants, even those living in the country legally, in determining eligibility for benefits.

The tougher version appealed to right-wing parties, who backed it on Monday.

Ms Le Pen welcomed the amended bill, calling it an “ideological victory” for the far-right.

“This is our bill,” said Eric Ciotti, the leader of the right-wing Republican party. He called it “firm and courageous”.

But left-wingers said Mr Macron was enabling the far-right. “History will remember those who betrayed their convictions,” Socialist party leader Olivier Faure said.

Leaders of least two left-led areas, Seine-Saint-Denis and Lot, said they would refuse to implement the provisions of the law on benefits for non-citizens.

The French vote came hours before an EU agreement to reform the asylum system across the bloc’s 27 member states.

The new pact, agreed by EU governments and European Parliament members, includes creating border detention centres and enabling the quicker deportation of rejected asylum seekers.

Hailed as a landmark agreement by Parliament President Roberta Metsola, the new system allows asylum seekers to be relocated from southern member states, which have the highest numbers of arrivals, to other countries.

It still has to be formally approved by the Parliament and member states.

The new French legislation exposed divisions within the governing alliance. 27 MPs voted against while 32 abstained – almost a quarter of pro-Macron MPs.

Health Minister Aurélien Rousseau, who was a member of the Communist party in his youth, stepped down in protest at the immigration law. Several other ministers are reportedly on the verge of quitting.

“Some measures in the bill make me very uncomfortable,” said Yaël Braun-Pivet, the president of the lower house of parliament and a member of Mr Macron’s party.

The bill would have passed if Ms Le Pen’s party had abstained, though not if it had voted against. The government pointed to the size of its majority to argue that it did not depend on National Rally votes.

Speaking after the vote, the prime minister accepted some measures in the law might not be constitutional.

“We will ask the Constitutional Council,” she told French radio, referring to a top court which upholds the constitution’s principles.

Human rights groups denounced the new reform as the most regressive immigration law for decades.

Mr Macron’s party lost its majority in parliament in elections in June 2022. Since then, the government has frequently found itself unable to win votes in parliament.