Police in southwest France on Monday detained a former soldier who fled into a forest after firing on security forces in an incident that sparked a massive manhunt, officials said.

The government's top official in the Dordogne region, Frederic Perissat, told a press conference in Le Lardin-Saint-Lazare that the suspect was shot and wounded after exchanging fire with police, and had been taken into custody.

His injuries are "serious," said Andre Petillot, the head of the gendarme police for the Nouvelle-Aquitaine region, who added that no officers had been wounded.

Authorities had released earlier Monday a picture of the suspect, Terry Dupin, describing the bearded 29-year-old as a "dangerous individual."

Police released a wanted photo of Terry Dupin on Monday.
Police released a wanted photo of Terry Dupin on Monday. GENDARMERIE NATIONALE / -

He was hiding out in a forest outside the village of Le Lardin-Saint-Lazare, whose 1,800 residents had been ordered to stay indoors during the search.

Elite tactical units and around 300 gendarmes backed up by armoured vehicles, helicopters and sniffer dogs had surrounded a four-square-kilometre (1,000 acres) patch of dense and rocky woods.

The search began after Dupin showed up at his ex-partner's home at around midnight on Saturday, police sources said, despite a restraining order following four previous domestic violence convictions, the most recent in February.

He allegedly struck the woman and then fired a .30-30 Winchester hunting rifle at her new boyfriend, without hitting him.

More than 300 officers took part in the search of dense woods in the Dordogne region of southwest France.
More than 300 officers took part in the search of dense woods in the Dordogne region of southwest France. AFP / Diarmid COURREGES

Dupin was wearing an ankle bracelet that informs police if he approaches the former partner, with whom he had three children, but it does not function as a tracking device.

"Contact had been established several times... but was followed by gunfire. Each time there was contact with him, he's opened fire," Perissat said Sunday.

The man had indicated that he intended to go down guns blazing, and Petillot said Monday that "he was still in a suicidal frame of mind."

Dupin was no longer allowed to own weapons and probably obtained the rifle illegally, a police source said.

He was sentenced to 16 months in prison for the most recent domestic violence conviction, of which eight were suspended, but in May a court reduced the sentence to an obligation to wear an electronic bracelet.

Dupin served in the army from 2011 to 2016, and was currently working as a truck driver at a public works company.

"He was a model employee, we couldn't fault him for anything," the firm's owner, who requested anonymity, told AFP.

"We knew he had been in the military... but nothing else," she said. "We would have never suspected anything like this."