Three suspected jihadists were killed and one was captured Tuesday in a pre-dawn raid by security forces on a house in Ouagadougou, the capital of Burkina Faso, the defence ministry said.
The militants had "a connection" with a brazen attack in March on Burkina's armed forces headquarters and the French embassy, it added.
In Tuesday's operation, a member of a gendarmerie assault unit died of his wounds and six other people -- four gendarmes and two neighbours -- were injured, the ministry said.
Police found six assault rifles, explosives and detonators, French and Burkinabe military clothing, mobile phones and SIM cards, and a notebook with writing in Arabic, it added.
Burkina Faso is in the grip of a three-year-old jihadist insurgency that has killed scores of people and driven thousands from their homes.
Ouagadougou has come under attack three times, mostly recently on March 2, when jihadists attacked the military headquarters and French embassy in a coordinated operation claimed by the so-called Group to Support Islam and Muslims (GSIM).
Eight soldiers and eight assailants were killed, and 61 soldiers and 24 civilians were injured, according to an official toll released three days later.
Security Minister Clement Sawadogo, speaking to the press, said Tuesday's raid aimed at neutralising "suspected terrorists with a connection to the March 2 attacks."
The inhabitants of the house had "an arsenal which they used to fight back against our men... it's clear that they really were terrorists equipped to carry out missions," Sawadogo said.
The identity of the four men was not immediately known, he said, adding that police made "about 30" arrests in a routine post-operation sweep.
A police officer, speaking on condition of anonymity, said the operation lasted from 3am to 7am.
An AFP reporter saw two corpses in front of a suburban house on the southwestern rim of Ouagadougou and a third in a courtyard.
Local resident Issiaka Ilboudo, who lives opposite the house, said there had been "intense gunfire".
"It was around 3am that we heard noise, it was people running on the roofs of the houses," Ilboudo said.
"We then heard shooting, which sometimes lasted 30 or 45 minutes, then stopped and resumed."
Another resident, Pascal Lengani, said the house had been newly built and put up for rent last July, but nobody in the neighbourhood knew the inhabitants or had any idea how many lived there.
Tuesday's operation came eight days after the assassination of the prefect -- the state's paramount representative at local level -- in Oursi, a town in the far north near the Mali frontier.
Last month, the authorities in the eastern and northern border regions arrested around 100 people and seized explosives.
In the previous attacks in Ouagadougou, in January 2016, jihadists attacked the city's Splendid Hotel and a cafe, leaving 30 dead, around half of them foreign nationals.
In August 2017, two young gunmen opened fire on people at a Turkish restaurant just metres (yards) away from the Splendid Hotel, killing 19 people, at least eight of them foreigners.
On March 2, jihadists carried out a coordinated attack in central Ouagadougou, targeting the country's military headquarters and the French embassy