French police have arrested an ex-soldier who triggered a manhunt after allegedly opening fire on officers responding to a domestic violence incident.
Authorities said Terry Dupin, 29, was taken into custody after he was shot and wounded during a gun battle with police.
Interior Minister Gerald Darmanin said on Twitter that the man had been "neutralised" and praised the hundreds of security forces deployed since Sunday.
On Monday, police released a picture of the suspect, describing the bearded man as a "dangerous individual".
After the initial exchange with police on Saturday, Dupin fled into a forested area of the Dordogne region in south-west France, where he hid until his arrest.
More than 300 officers, backed up by seven helicopters, seven armoured vehicles and sniffer dogs, were drafted in to help with the search.
Dupin has prior domestic violence convictions and is required to wear an electronic tag.
Andre Petillot, commander of the regional police force, said the ex-soldier knew the area well and adapted easily.
He said the man had opened fire on police multiple times.
"We are doing everything we can to get him to surrender but we also want to avoid a tragedy within our ranks,” he said on Sunday.
"The goal is to bring him in alive.”
The suspect hid out in a craggy, heavily wooded area of about four square kilometres outside the village of Le Lardin-Saint-Lazare.
Perigueux prosecutor Solene Belaouar said he had been convicted of domestic violence four times, the first in 2015.
This month, his eight-month prison sentence was reduced to him having to wear an electronic ankle bracelet.
But Mr Petillot said it was designed only to prevent the suspect from going near his ex-partner's home and was "not a geo-localisation tool".
He said on Sunday the man indicated he intended to go down guns blazing, but that tensions had eased a little.
It is understood the suspect served in the French army between 2011 and 2016.
He was believed to be armed with a Winchester 30-30 hunting rifle, which is typically used in the region to hunt boar.
The weapon is understood to have been obtained illegally, since the man is not allowed to possess weapons.
Police said the suspect went to his ex-partner's home in Le Lardin-Saint-Lazare, a village of around 1,800 people, at about midnight on Saturday.
The search began after Dupin appeared at his ex-partner's home, despite a restraining order.
He allegedly struck the woman and then fired the rifle at her boyfriend, without hitting him.
Police urged local residents to remain indoors while the suspect was on the run.