13 others have been freed and six gunmen were killed after security forces stormed the site
Twenty people have been killed after gunmen took dozens of hostages during a 10-hour siege at a restaurant in Bangladesh's capital.
"Most of (the hostages) were killed mercilessly by sharp weapons," Army Brigadier General Nayeem Ashfaq Chowdhury said.
Another army officer, Lieutenant Shahab Uddin, told the AFP news agency: "All 20 of the hostages who were killed were foreigners.
According to the country's Joint Force Command, nine of the victims were Italian, seven were Japanese, one was from India, two were Bangladeshi and one was a U.S. citizen of Bangladeshi origin. Eleven of the victims were male and nine were female.
It is thought that eight or nine attackers stormed the Holey Artisan Bakery in Dhaka's diplomatic zone late on Friday.
One kitchen staffer said the attackers were armed with guns and bombs, entering the building at around 9.20pm local time and taking customers and staff hostage.
A massive firefight erupted outside the cafe, which is located in the Gulshan area of the capital.
Six gunmen were also killed and 13 hostages rescued.
Two police officers were among the 20 killed as police approached the restaurant during an initial attempt to break the siege.
One Japanese and two Sri Lankans were among those rescued.
Earlier, Japan said one of its citizens had been shot and wounded.
Deputy chief cabinet secretary Koichi Hagiuda said seven other Japanese citizens had been eating together at the restaurant, but officials had been unable to contact them.
Italian media has reported that seven Italians were in the restaurant when the attack began.
Talking to CNN, cafe worker Shumon Reza described the scene before escaping: "The guests were all lying on the ground under the chairs and tables. And we [the employees] escaped in whichever safe way we could. Some went to the roof, others went to other safe spots."
Bangladesh Prime Minister Sheikh Hasina said one of the militants had been arrested.
"Because of the effort of the joint force, the terrorists could not flee," she said.
Islamic State claimed responsibility for the attack, according to the SITE Intelligence Group.
The Amaq news agency, which is affiliated to IS, posted pictures said to show hostages' bodies, but the images' authenticity could not be confirmed.
Authorities in Dhaka said 25 police officers and one civilian were being treated for injuries, including 10 in a critical condition. Injuries included bullet wounds and broken bones.
The restaurant is located near a small hospital as well as the Nordic Club, a private members' club popular with expats.
There has been a string of recent attacks on religious minorities and secular activists by suspected Islamist militants in Bangladesh.
Earlier on Friday, a Hindu temple worker was hacked to death in southwest Bangladesh by three assailants.