OUAGADOUGOU, Burkina Faso — Gunmen believed to be Islamist extremists opened fire at a Turkish restaurant in Ouagadougou, the capital of Burkina Faso, late Sunday, killing at least 18 people, the second attack on a restaurant popular with foreigners in two years.

There was no immediate claim of responsibility for the attack, which continued into the early hours of Monday. Gunfire could still be heard almost seven hours after it began.

The communications minister, Remi Dandjinou, said Monday morning that the victims had come from several countries, and that at least eight people had also been wounded. He added that two of the assailants had been killed, that the response by security forces had ended, and that searches were continuing in the neighborhood around the restaurant.

Security forces and armored vehicles arrived at the crowded restaurant, Aziz Istanbul, after reports of shots being fired. Capt. Guy Ye of the police said at least three assailants had arrived at the restaurant on motorcycles and had opened fire, apparently at random.

Burkina Faso, a landlocked nation in Western Africa, is one of the poorest countries in the world. It shares a border with Mali, which has long battled Islamic extremists.

The episode overnight summoned memories of a January 2016 attack at a hotel and cafe that left 30 people dead. The three assailants in that standoff were foreign-born, according to Al Qaeda in the Islamic Maghreb, which claimed responsibility for that attack, as did the jihadist group Al Mourabitoun. But the terrorist threat in Burkina Faso is increasingly domestic, experts say.