Dhaka – Heavily armed militants murdered 20 hostages in Bangladesh, hacking many of their victims to death, before six of the attackers were gunned down at the end of a siege on Saturday at a restaurant packed with foreigners.As the Islamic State (ISIS) group claimed responsibility for the carnage at the start of the Eid holiday, Prime Minister Sheikh Hasina said she was determined to eradicate militancy in the mainly Muslim nation.Survivors told of how the hostage-takers separated locals from the foreigners who were eating side-by-side before embarking on a killing spree which was brought to an end 11 hours later in a fierce gun battle.Although there was no breakdown of the casualties, the army said they were mainly Italian or Japanese while an Indian student was confirmed as among the dead. Most had been slaughtered with sharpened weapons.Two police officers were also killed at the start of the siege while a total of six attackers were shot dead at the finale when elite commandos stormed the cafe.One of the assailants was captured alive and arrested, the army said.Hasina's government has previously blamed a string of deadly attacks, targeting religious minorities and foreigners, on her domestic opponents but the incident will heighten fears that ISIS's reach is spreading."It was an extremely heinous act. What kind of Muslims are these people?" said Hasina in a televised address.The attack, by far the deadliest of a recent wave of killings claimed by ISIS or a local Al-Qaeda offshoot, was carried out in a neighbourhood which is home to the country's elite and houses many of the major embassies.Sharp weaponsAnnouncing the end of the siege, officials said that 13 hostages had been rescued after members of an elite force took control of the cafe and shot dead six of the gunmen.But while Hasina called the outcome a "success", the security forces later revealed that 20 of those taken captive were killed."Most them had been brutally hacked to death with sharp weapons," an army spokesperson, Brigadier General Nayeem Ashfaq Chowdhury, told reporters.One senior army officer said that all 20 of the victims were foreigners but local media said four were Bangladeshi and a spokesperson said the situation remained unclear."We're doing the identification. After that, we can determine whether all 20 are foreigners or if there are any Bangladeshis among the dead," army spokesperson Rashidul Hasan told AFP.Prime Minister Matteo Renzi prepared Italians for "a painful loss" as local media said 11 had been taken hostage, only one of whom had escaped.There was similar foreboding in Tokyo where Prime Minister Shinzo Abe said his government was trying its best to confirm the fate of seven Japanese nationals.And India confirmed that one of its nationals, a 19-year-old female student at the University of California, Berkeley, was among the dead.Foreigners and Bangladeshis could be seen standing outside the upmarket Holey Artisan Bakery cafe after the siege, still awaiting news on their loved ones inside.Witnesses recounted how a massive gunfight erupted on Saturday morning as more than 100 commandos launched the rescue operation, nearly 11 hours after the siege began shortly before 21:00.Eight hostages including a foreigner were rescued in the first few minutes of the operation. TV footage showed ambulances rushing some of those who had been freed to a military hospital.The father of one of the survivors was told by his son how the hostage-takers separated the locals from foreigners."They [the foreigners] were taken to the upper floor and the Bangladeshis were kept around a table," Rezaul Karim told AFP.Fierce firefightThe area around the restaurant was cordoned off after the militants launched their attack and then became involved in a fierce firefight.Police said two officers, including the head of the local police station, were killed. Hasina said 30 officers were injured.The attack triggered widespread condemnation, with Pope Francis condemning "such barbarous acts as against God and humanity". EU foreign policy chief Federica Mogherini called it "a direct challenge to our global community".Britain meanwhile urged its nationals to steer clear of international hotels, supermarkets, restaurants and clubs.The attack follows a series of killings targeting religious minorities and foreigners.Earlier on Friday, a Hindu temple worker was hacked to death in western Bangladesh and a Hindu priest was stabbed early on Saturday in the southwest.The government and police blame home-grown militants for the killings, saying they are part of a plot to destabilise the country.Bangladesh's main Islamist party has been banned from contesting polls and most of its leaders have been arrested or else executed after recent trials over their role in the 1971 war of independence from Pakistan.Hasina called on all Bangladeshis to "resist these terrorists"."My government is determined to root out terrorism and militancy," she added.Last month authorities launched a crackdown on local jihadists, arresting more than 11 000 people but critics allege the arrests were arbitrary or designed to silence political opponents.