France's charismatic justice minister has unexpectedly resigned after objecting to President Francois Hollande's push to revoke citizenship from convicted terrorists with dual nationality.
Mr Hollande announced Christiane Taubira's resignation just ahead of a cabinet meeting and hours before a parliament commission takes up the citizenship bill.
Ms Taubira, a leftist best known for championing the legalisation of gay marriage, tweeted that "sometimes to resist is to remain, sometimes to resist is to leave".
As a black woman from French Guiana on the Caribbean coast, she has been a pioneer for women and minorities in French politics but sometimes a target for racist slurs by far-right militants.
Ms Taubira is being replaced by Jean-Jacques Urvoas, a Socialist politician from Brittany considered a specialist on security issues who is seen as close to prime minister Manuel Valls.
The citizenship bill, prompted by the deadly November 13 attacks in Paris, is popular among conservatives and the far right but is especially divisive for the governing Socialists.
Polls show most French support the idea, but opponents fear it would unfairly target Muslims. Some critics compare it to the revocation of citizenship of French Jews during the Second World War.
French and Belgian extremists linked to the Islamic State group, some of them of Moroccan descent, were behind the Paris attacks, which killed 130 people and wounded hundreds.
French anti-racist organisation SOS Racisme praised the "courage of a great lady".
"As a justice minister, despite racism she has faced too often in the silence of her peers ... Christiane Taubira has been able to stand up for her values and try to change the justice system," it said.
The bill presented by Mr Valls includes a range of measures for convicted terrorists that would go from depriving them of the right to vote, the right to become a civil servant to revoking citizenship.
The prime minister, however, made a last-minute modification to find a consensus that would satisfy both the left and the right.
Mr Valls said no mention of dual nationality would appear in the constitution and France would respect its obligations under international law to prevent it from leaving a person stateless.
Opponents of the measure say it would create two classes of citizens - dual nationals who could lose their citizenship and others who cannot - in opposition to the principle of equality in France's constitution.
The bill is to be debated next week in France's lower house of parliament, the National Assembly.
Ms Taubira said: "I'm leaving the government on a major disagreement.
"The terrorist threat is serious and unpredictable but we have learned to hunt it down. I think we cannot concede it any victory, whether it's a military, diplomatic, political or symbolic one."