DHAKA, Bangladesh -- All the attackers in the deadly assault on a cafe in Dhaka were Bangladeshi citizens, and five of them were militants that police had tried to arrest previously, Police Inspector General Shahidul Hoque told CNN Saturday.
Authorities also released the nationalities of the 20 hostages who were found dead inside the Holey Artisan Bakery cafe after Bangladeshi troops stormed the cafe early Saturday morning, ending a nearly 11-hour siege.
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, according to the country's Joint Force Command. Eleven of the victims were male and nine were female.
Two police officers had been killed in a gunfire exchange earlier in the standoff, authorities said.
The attack in the affluent, diplomatic enclave was the deadliest and boldest act of terror in a country that has become increasingly numb to ever-escalating violence by Islamist militants.
The victims were among roughly three dozen people taken hostage when attackers stormed the cafe Friday evening with guns, explosives and sharp weapons, authorities said.
Some guests and workers managed to escape, jumping from the bakery's roof. Others crouched under chairs and tables as the gunmen fired indiscriminately, witnesses said.
Early Saturday morning, military commandos moved in. By the end, 13 people had been rescued and 20 were dead, officials said.
Six terrorists were killed and one was captured alive, Bangladeshi Prime Minister Sheikh Hasina said Saturday.
ISIS claims attack
ISIS claimed responsibility for the attack through its media branch, Amaq.
Initially, a U.S. official told CNN it was more likely that al Qaeda in the Indian Subcontinent conducted this attack because it had demonstrated a more capable presence in Dhaka through attacks over the past few months. But after photos purportedly showing the inside of the cafe and dead hostages were posted on an ISIS-affiliated website, U.S. officials said they are now focused on ISIS as the perpetrator.
The photos were posted on Amaq while the siege was ongoing, with a claim that the extremely graphic images were of foreigners killed by terrorists in the attack.
The fact that the images were posted approximately 90 minutes before Bangladeshi forces stormed the restaurant suggest that several hostages had already been killed before the commandos moved in. While CNN can't verify the authenticity of the photos, the images show wall murals, glossy tables with carved legs, white chairs and other items very similar to those seen on the cafe website.
These photos don't prove that ISIS had operational control of the attack, but the website also displayed the photos and noms de guerre of five individuals, claiming they carried it out.
Majority of dead had ties to the United States,Japan and Italy
Hasina declared two days of mourning for the victims of the massacre, a period that begins Sunday.
One of the dead was an American citizen, authorities said, but it was unclear if that victim was one of three students from universities in the United States. Two of them attended Georgia's Emory University, including Abinta Kabir of Miami, who was a sophomore at Emory's campus in Oxford, Georgia. She was in Dhaka visiting family and friends, the school said.
The other was Faraaz Hossain, of Dhaka, a junior who was to attend Emory's Goizueta Business School in Atlanta.
"The Emory community mourns this tragic and senseless loss of two members of our university family. Our thoughts and prayers go out on behalf of Faraaz and Abinta and their families and friends for strength and peace at this unspeakably sad time," a statement from the university said.
The third student was Indian citizen Tarishi Jain, 19, who was studying at the University of California at Berkeley, according to India's minister of external affairs, Sushma Swaraj.
Italy's foreign ministry named the country's victims as Adele Puglisi, Marco Tondat, Claudia Maria D'Antona, Nadia Benedetti, Vincenzo D'Allestro, Maria Rivoli, Cristian Rossi, Claudio Cappelli and Simona Monti.
Japan announced Saturday that seven of its nationals are confirmed dead. The victims were corporate employees having dinner with management consultant Tamaoki Watanabe, one of the survivors, said Japanese Chief cabinet secretary Yoshihide Suga.
Watanabe and three other Almec VPI employees were on a project for Japan International Corporation Agency, a government-funded organization for international development and cooperation, according to an Almec statement.
The company does not yet know the fate of the other three employees, according to the statement.
The Japanese government, which is not disclosing names at this point, said it would arrange a government flight for the families of victims as early as Sunday.
Japan has sent Vice Foreign Minister Seiji Kihara, along with a team of terrorism experts, to Dhaka.
Two Sri Lankans were among the hostages rescued, officials said.
Hasini said she would form anti-terrorism committees with the police and the public to help identify potential terrorists and plots. She urged the public -- and especially parents -- to combat religious extremism by teaching children and the misguided to do "the right thing."
"For those vulnerable and young people who are being misguided, and those that are aiding them, I have one question," Hasini said. "What do you hope to achieve by killing innocent people? Islam is a religion of peace. End your killing in the name of Islam. Don't malign our holy religion."
Workers jump from roof
Witnesses described chaotic scenes when the gunmen burst into the cafe.
Cafe worker Shumon Reza said he saw six to eight gunmen enter the bakery. He escaped as they came in.
"The guests were all lying on the ground under the chairs and tables," Reza told Boishakhi TV. And we (the employees) escaped in whichever safe way we could. Some went to the roof, others went to other safe spots."
Shortly after, Reza said, the attackers started throwing explosives, one after another.
"We thought it wasn't safe anymore and jumped from the roof," he said.
Attack shocks nation
Even in a country that has become increasingly numb to Islamist attacks, the Holey Artisan Bakery standoff was particularly jolting in its brazenness.
It was not so much that the attack took place in a public place, in full view of a horrified public. Such public attacks have happened before -- American blogger Avijit Roy was hacked with machetes outside Bangladesh's largest book fair.
It was not even that the targets were foreigners. That, too, has happened before -- more than once.
It was the time and the location that revolted many everyday Bangladeshis.
The gunmen went into the bakery on a Friday, the holiest day of the week in Islam, and at a time when the devout would be sitting down to break their fast in the holy month of Ramadan.
And they targeted not a bar or a club -- the kinds of venues fundamentalist Muslims rail against -- but a bakery.
Why did it happen at the bakery?
It's more likely because of the bakery's location: Gulshan.
Gulshan is one of Dhaka's most affluent neighborhoods. Perhaps more importantly for the attackers, it's a diplomatic enclave. Most of the embassies and high commissions have a presence in Gulshan.
Residents in the neighborhood expressed shock because the upscale neighborhood was considered safe with buildings behind walls, gated driveways and security guard booths.
Holey Artisan Bakery had become a popular destination for expats and diplomats, and attackers may have chosen it hoping for maximum global impact.
"They wanted maximum exposure. They got it," said Sadrul Kabir, a Gulshan resident.
Bangladesh a new ISIS hotspot?
Bangladesh authorities have consistently denied an ISIS presence in the country despite previous ISIS claims for past attacks.
Other attacks have also been claimed by local Islamist groups.
"We don't want these terrorists in Bangladesh," the Prime Minister said. "This type of situation is a first in Bangladesh, until now they were committing individual murders. But now suddenly they created this type of situation. What they did here was a very heinous act."
Experts said Bangladesh is a target for terrorists.
"In the case of ISIS and its connection to international terrorism in Bangladesh, they have mentioned the country several times in Dabiq, their online journal," said Sajjan Gohel, the international security director at the Asia Pacific Foundation. "They talked about the fact that they were going to carry out more attacks, they were going to increase the tempo, and they were calling for volunteers from Bangladesh to join them."
Home to almost 150 million Muslims, the country had, until recently, avoided the kind of radicalism plaguing others parts of the world. But in the last two years, a wave of murders across Bangladesh have killed secular writers, academics and religious minorities.
The string of targeted murders has sparked debate about the involvement of ISIS.
In response to growing criticism, the Bangladeshi government launched an anti-militant drive last month, rounding up and arresting hundreds. But many of those detained are believed to be ordinary criminals and not Islamic extremists.
CNN's Farid Ahmed reported from Dhaka and Madison Park wrote the story. CNN's Steve Almasy, Barbara Starr, Sabrina Khan, Yoko Wakatsuki, Jareen Imam, Elizabeth Joseph and translator Sudip R. Khan contributed to this report.
By Madison Park, Farid Ahmed and Steve Visser