Burkina Faso security forces killed three suspected jihadist attackers at a restaurant in central Ouagadougou, Communications Minister Remi Dandjinou said on Monday.
The gunmen killed 17 people and wounded eight since attacking the Aziz Istanbul restaurant in the city center late on Sunday.
Dandjinou said security forces are seeking to free people still trapped inside.
A Reuters witness saw customers running out of the Aziz Istanbul restaurant in central Ouagadougou as police and paramilitary gendarmerie surrounded it amid gunfire.
“This is a terrorist attack,” Dandjinou told a news conference.
He said the toll was provisional because the security operation was still underway.
Dandjinou said Burkina Faso security forces killed three suspected jihadists but there were still people trapped inside the building.
A woman said she was in the restaurant celebrating her brother’s birthday when the shooting started.
“I just ran but my brother was left inside,” the woman told Reuters TV as she fled the building.
Burkina Faso, like other countries in West Africa, has been targeted sporadically by jihadist groups operating across Africa’s Sahel.
Most attacks have been along its remote northern border region with Mali, which has seen attacks by Islamist militants for more than a decade.
Thirty people were killed when gunmen attacked a restaurant and hotel in Ouagadougou in January 2016 in an incident claimed by al Qaeda in the Islamic Maghreb (AQIM).
AQIM and related jihadi groups were largely confined to the Sahara desert until they hijacked a Tuareg rebellion in Mali in 2012 and swept south.
French forces intervened to prevent them taking Mali’s capital, Bamako, the following year, but they have since gradually expanded their reach, launching high-profile attacks on Burkina Faso and Ivory Coast.
A new al Qaeda-linked alliance of Malian jihadist groups claimed an attack in June that killed at least five people at a luxury Mali resort popular with Western expatriates just outside Bamako.
African nations launched a new multinational military force to tackle Islamist militants in the Sahel in July, but it won’t be operational until later this year and faces a budget shortfall.