One of the victims of the Dhaka cafe shooting was a Muslim student who, despite being allowed to leave by the militants responsible, refused to desert his friends and fellow hostages.

Faraz Hossain, a Bangladeshi student at Emory University in the US, was killed alongside 19 others including Abinta Kabir, who was studying at the same US university.

His nephew Hishaan said Mr Hossain had been offered the chance to leave the cafe along with women wearing hijabs.

However, according to the New York Times, when the two women accompanying him in Western clothes were refused, he chose to stay behind and was subsequently killed.

Twenty people were killed in the attack on Holey Artisan Bakery in the Bangladeshi capital including seven Japanese aid workers, an Indian student and nine Italian businessmen and women.

Two police officers were killed and 30 injured during the 12-hour siege before Bangladeshi commandos stormed the cafe rescuing 13 hostages. The commandos killed six of the gunmen and arrested another.

An Italian businessman, Gianni Boschetti, had taken a phone call in the cafe's garden when the attack began and managed to escape by throwing himself into nearby bushes, BBC reported.

The militants reportedly tortured and killed any hostage unable to recite a verse from the Qur'an.

In pictures: Bangladesh attacks Show all 10 1 /10 In pictures: Bangladesh attacks In pictures: Bangladesh attacks Bangladesh attacks Hindu ashram worker Nityaranjan Pande, 62, was hacked to death in Pabna on 10 June 2016 AP In pictures: Bangladesh attacks Bangladesh attacks Hindu priest Anando Gopal Ganguly, left, was murdered in Jhenidah in Bangladesh on 7 June 2016 EPA In pictures: Bangladesh attacks Bangladesh attacks Mahmuda Khanam Mitu, wife of the Deputy Commissioner of Chittagong Metropolitan Police, was murdered in Chittagong, Bangladesh on 5 June 2016 EPA In pictures: Bangladesh attacks Bangladesh attacks Bangladesh Students Union arranged a torch procession in protest over recent murders of free thinkers in Dhaka NurPhoto In pictures: Bangladesh attacks Bangladesh attacks Murdered gay rights activist Xulhaz Mannan, who was editor at Bangladesh’s only LGBT magazine Rex In pictures: Bangladesh attacks Bangladesh attacks A Bangladeshi policeman stands guard at the site of the murder of a law student, hacked to death by four assailants the night before, in Dhaka on April 7, 2016 AFP/Getty In pictures: Bangladesh attacks Bangladesh attacks People have protested against the murders around the world, seen here in Kolkata AFP/Getty Images In pictures: Bangladesh attacks Bangladesh attacks A relative of dead Bangladeshi blogger Washiqur Rahman reacts after seeing his body at Dhaka Medical College in Dhaka on March 30 AFP/Getty Images In pictures: Bangladesh attacks Bangladesh attacks People gather on the spot where Bangladeshi blogger Avijit Roy was killed in a street in Dhaka (EPA) EPA In pictures: Bangladesh attacks Bangladesh attacks Bangladeshi social activists shout slogans during a protest against the killing Avijit Roy in Dhaka on February 27, 2015 AFP/Getty Images

Isis has claimed responsibility, warning citizens of "crusader countries" that their citizens would not be safe "as long as their aircraft are killing Muslims". It also posted pictures of five fighters grinning in front of a black flag who it said were involved in the attack, according to the SITE monitoring website.

However, Bangladesh Home Minister Asaduzzaman Khan told Reuters that neither Isis nor al Qaeda was involved. He reiterated the government's line that home-grown militants were responsible for a spate of killings in the country over the past 18 months.

"This was done by JMB," Khan said, referring to Jamaat-ul-Mujahideen Bangladesh, which claims to represent Islamic State in Bangladesh.

Bangladesh's home secretary, Asaduzzaman Khan, said the the attackers were not affiliated to Isis but belonged to a banned local militant group.

Mr Khan told AFP: "They are members of the Jamaeytul Mujahdeen Bangladesh [JMB]. They have no connections with the Islamic State."