Bangladesh police shot dead the pizza chef of a Dhaka restaurant, mistakenly thinking he was one of the militants who killed 20 people, and misread online warnings of an impending assault, police and government officials said on Tuesday.
New details from interviews with the officials and the first information report registered at a Dhaka police station painted a picture of security agencies slow to deal with Friday's attack, one of the country's deadliest.
"This was the first time in Bangladesh such a thing had taken place. Nobody was prepared for it. They did not realise the gravity of the situation initially," H.T. Imam, a political adviser to Prime Minister Sheikh Hasina, told Reuters in an interview. "Initial response was slow."
Bangladesh authorities who monitor social media saw several messages on Friday posted on Twitter saying there would be an attack, he said.
But the police thought any attack was more likely to target embassies and major hotels and restaurants, Imam said. Police closed major hotels and eateries in and around hotel Westin, about 1 km (0.62 mile) from the Holey Artisan Bakery and O'Kitchen, the restaurant that was attacked, he said.
"They (police) didn't think at all it can be this place," Imam said. "It is to be investigated whether there was an intelligence failure."
The attack, claimed by Islamic State, marked a major escalation in the scale and brutality of violence aimed at forcing strict Islamic rule onto Bangladesh, whose 160 million people are mostly Muslim.
Police named five Bangladeshi gunmen who stormed the restaurant: Nibras Islam, Rohan Imtiaz, Meer Saameh Mubasheer, Khairul Islam and Shafiqul Islam.
Several other people have been arrested.
The attackers separated foreigners from locals, and most of the dead were foreigners, from Italy, Japan, India and the United States. But survivors told local television that Muslims who could not recite the Koran were also killed.
The targeting of foreigners has unsettled the country's $26 billion garment export industry, with some foreign retailers suspending all business travel to the country.
The bodies of the nine Italian victims were flown to Rome on Tuesday.