Condemning a "disgusting attack", President Roch Marc Christian Kaboré vowed that his country's "valiant people" would "put up a resistance to terrorism with no concessions" after security forces had put an end to the attack and hostage-taking on Monday morning.
The victims were of various nationalities and two attackers were also killed, officials said.
French President Emmanuel Macron condemned the attack and praised the "effiective mobilisation" of the Burkinabé security forces.
Macron and his counterpart in the former French colony, Roch Marc Christian Kabore, were to discuss the situation later Monday.
The operation finished at about 5.00am Monday, Communications Minister Remis Dandjinou announced on RFI.
Two of the four reported attackers were among the 18 dead, while about 10 people were injured.They had been rushed to hospital where doctors said during the night that they were in a critical condition.
The attack on the Aziz Istanbul café-restaurant started at about 9.00pm, witnesses reporting two assailants armed with Kalashnikovs arriving on a motorcycle and opening fire, followed by three following later in a four-wheel drive vehicle and opening fire.
The restaurant was often used by foreigners and officials said that customers of various nationalities were present at the time.Turkey has said that one of its citizens were among the dead.
Close to site of previous attack
France, the former colonial power, advised its nationals to stay away from the area and declared that it was standing with the Burkinabé people and authorities "in this painful moment".
The Aziz Istanbul is about 200 metres from the café Capuccino, which was the target of an attack claimed by Al Qaeda in the Islamic Maghreb that killed 30 and injured 71 in January 2016.
There have been several attacks and kidnappings in Burkina Faso in the last two years and an Australian and a Romanian, who were taken captive in 2015 are still being held by an Al Qaeda-linked group.
Burkina Faso is one of the five African countries cooperatiing in the G5 force to combat armed groups and smuggling in the Sahel region.