A man stabbed and badly wounded a policewoman in the town of La Chapelle-sur-Erdre in western France on Friday before he was arrested in a shoot-out, the national gendarmerie force.
The assailant had been caught after a manhunt that involved two police helicopters and more than 200 officers.
There was a shoot-out during the arrest and two officers were shot and wounded. The stabbed policewoman was in a critical state, BFM TV reported.
"The police have neutralised the suspect behind the knife attack against a municipal policewoman in Chapelle-sur-Erdre. Thank you and my thoughts for those officers wounded making the arrest," Interior Minister Gerald Darmanin tweeted.
Darmanin said he would be travelling to the scene of the attack.
The assailant's motive was not immediately clear. The office of France's anti-terrorism prosecutor said it was monitoring the situation but was for now not leading the investigation.
The incident comes a month after a female police administrative worker was knifed to death near Paris by a Tunisian national. The man, who police said stole his victim's weapon, initially fled in a car before a crash forced him to continue on foot.
Schools in the area were under police protection while police conducted a manhunt in an area to the north of the city of Nantes.
The suspect was tracked down and surrounded in a forest near Chapelle-sur-Erdre, the regional newspaper Ouest France reported. He opened fire on officers, a police source said.
Tackling domestic security is likely to be at the centre of the campaign ahead of next year's presidential election.
Marine Le Pen, leader of the far-right and the strongest challenger to Emmanuel Macron's expected re-election bid, paints the president was weak on security and says the police need more protection.