DHAKA (Web Desk) – A Bangladesh court on Sunday granted bail to a student of Canada’s University of Toronto, who was dining in a Dhaka cafe when it was attacked by militants was later detained as a suspect, after police dropped charges against him.

Tahmid Hasib Khan, 22, was at the Holey Artisan Bakery on the evening of July 1 when it was stormed by militants, beginning a 12-hour siege in which 20 hostages, mostly foreigners, two police officers and six suspected attackers died.

Khan’s family vehemently protested his innocence, saying the 22-year old was in the cafe as a customer and was not associated with the five gunmen who hacked and shot to death the hostages in an attack.

In video footage filmed by witnesses and militants, Khan appeared holding a pistol and talking to the hostage-takers, but police said forensic analysis had shown the Toronto University student had been forced to do so.

“Police submitted a report on September 28, saying that he was not involved in the Holey Artisan attack,” Khan’s lawyer Motiur Rahman said.

“The Dhaka Metropolitan Magistrate court on Sunday acquitted of terrorism charges and granted bail to him. We hope he will be released later today,” Rahman said.