- Country mourning after 20 hostages killed in restaurant
- Victims include 18 foreigners and two policemen
- PM says fighters want to turn Bangladesh into a "failed state"
- ISIL claimed the attack on what it called "citizens of crusader states"
- Home Minister tells AFP fighters "have no connections" with ISIL
Bangladesh has begun observing two days of national mourning after 20 hostages were slaughtered at a restaurant packed with foreigners in a major escalation of a campaign of attacks by armed groups.
Prime Minister Sheikh Hasina decreed the mourning period, which began on Sunday, as she vowed to drag Bangladesh back from the brink, warning of a concerted bid to turn one of the world's most populous nations into a failed state.
Amid mass condemnation of the Dhaka killings, victims of which included 18 foreigners, the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group said it had targeted a gathering of "citizens of crusader states" on Friday night at a Western-style cafe.
Bodies of the 20 hostages were found in pools of blood after commandos stormed the cafe to end the siege.
In addition, two policemen were also killed in the deadly attack in a high security area. Security officials said most of the victims were slaughtered with sharpened machete-style weapons.
Six gunmen were killed by the commandos in the final stages of the siege at the Holey Artisan Bakery cafe, but one suspect was taken alive and was being interrogated by Bangladeshi intelligence.
Despite ISIL's claim, Home Minister Asaduzzaman Khan said the fighters have "no connections with the Islamic State".
"They are members of the Jamaatul Mujahideen Bangladesh," Khan said, referring to a group which has been banned in Bangladesh for more than a decade.
Hasina's government has previously blamed a string of deadly attacks against religious minorities and foreigners on domestic opponents, but the latest attack - despite the government's denial - will heighten fears that ISIL's reach is spreading.
READ MORE: What is fuelling the rise of armed groups?
"Islam is a religion of peace. Stop killing in the name of the religion," Hasina said in a televised address to the nation.
"Please stop tarnishing our noble religion ... I implore you to come back to the rightful path and uphold the pride of Islam."
The 68-year-old prime minister said the people behind the attacks were trying to ruin Bangladesh, a mainly Muslim nation of 160 million people.
|Ruba Ahmed, mother of Emory University student Abinta Kabir, mourns as she arrives to identify her daughter's body [EPA]
"By holding innocent civilians hostage at gunpoint, they want to turn our nation into a failed state," she said.
Flags were being flown at half-mast in government offices and at other sites across the country while funerals of the two Bangladeshi victims were expected to be held.
UN chief Ban Ki-moon was among those who expressed outrage, stressing "the need to intensify regional and international efforts to prevent and combat terrorism".
There was agony in Italy whose government confirmed that nine of its nationals had been killed.
"The terrorists want to rip away the daily fabric of our lives," said Prime Minister Matteo Renzi.
"Our duty is to reply with even greater force, by affirming our values, the values of freedom of which we are proud, and which are stronger than hatred or terror."
Seven Japanese nationals were also killed in the attack and Prime Minister Shinzo Abe said he felt "profound anger that so many innocent people have lost their lives in the cruel and nefarious terrorism".
One Japanese citizen remains in a critical condition in hospital.
Al Jazeera's Wayne Hay, reporting from Tokyo, said: "There is no mention yet from the Japanese government of Islamic State; they are not using that term yet."
Our correspondent added that officials had expressed their regret at the killings, especially because the Japanese nationals were "trying to help the country" - many of those killed had been working on an aid project to help ease traffic congestion.
US officials said one American citizen was among those killed and the government in New Delhi confirmed that a 19-year-old Indian who was studying at the University of California, Berkeley, had died.
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 the night before.
IN PICTURES: Hostage drama in Bangladesh
Thirteen hostages were rescued in total, some of whom were taken 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.
The attack, by far the deadliest in a recent wave of killings, was carried out in the upmarket Gulshan neighbourhood which is home to the country's elite and many embassies.
Last month authorities launched a crackdown on local fighters, arresting more than 11,000 people but critics allege the arrests were arbitrary or designed to silence political opponents.