Most of the victims were Westerners, according to a source close to the investigation, who added that at least five Burkinabe nationals were also among the dead, while 30 people were injured.
Both the Swiss and French foreign ministries confirmed that two each of their citizens were killed when the jihadists struck a restaurant opposite the four-star hotel where the attackers holed up.
The Swiss victims have been identified as Jean-Nöel Rey, 66, the former head of Swiss Post (1990-1998) and ex-MP, and Georgie Lamon, 81, a former Socialist MP in the canton of Valais.
The two men were visiting Burkino Fasso, in connection with an aid group, to inaugurate a school canteen, the ATS news service reported.
The two Swiss citizens were killed at the Cappuccino restaurant, the news agency said.
Swiss flags were flying at half mast on Sunday from government buildings in Sion, the capital of Valais where both Swiss victims were from, and from the federal parliament building.
The flags will remain at half mast on Monday, federal government spokesman André Simonazzi, said on Twitter.
Didier Burkhalter, Swiss federal minister for foreign affairs, said he was profoundly saddened by the attack.
"We condemn this terrorist act with the greatest firmness," he said in a statement.
"We thank the the authorities of the country who intervened to put an end to these acts of violence and we ask that all can be done to find and judge the authors of these attacks."
Burkhalter added that the government's thoughts were with the families of the victims.
Burkina Faso authorities said the bodies of three jihadists had been identified.
All three were men, the minister said, adding that they were "very young".
"Those who have seen them believe they were very young, the oldest no older than 26," said Compaore, adding that the men had arrived to unleash the carnage in vehicles registered in neighbouring Niger.
A security source had earlier said there had been at least four attackers, including two women.
Compaore said 176 people had been rescued. "Most have been able to leave after being questioned," he added.
The gunmen attacked the Splendid hotel and the Cappuccino restaurant opposite, both popular with Westerners, on Friday evening, sparking a standoff with security forces that lasted until Saturday morning.