Seven Islamist militants are set to be hanged in Bangladesh for their roles in a 2016 terror attack that left 22 people, including one American, dead.

The siege on a café in Dhaka was carried out by five men who shot and hacked diners to death with machetes while taking others hostage. Following a 12-hour standoff, Bangladesh’s army stormed in and killed all five assailants. Thirteen hostages were rescued, but 22 people died during the attack, including an American, nine Italians and seven Japanese citizens, according to the BBC.

"The court gave them the highest punishment," Golam Sarwar Khan, a prosecutor, is reported to have said to the media Wednesday after the sentences were announced.

Police escort a member of a banned militant group after he was sentenced to death for an attack on a cafe that killed more than 20 people in Dhaka, Bangladesh, in 2016. (AP)

AT LEAST SEVEN KILLED IN BANGLADESH GAS EXPLOSION

Bangladesh has accused a local militant group of being behind the attack and those on trial were suspected of supplying the attackers with machetes and assault rifles, in addition to helping them plan the siege, the BBC reported.

The lawyer of those sentenced to death said he would appeal their punishment. Some of the men, the AFP said, shouted “Allahu Akbar” as they were led to a police van outside of the courtroom Wednesday.

Eight other militants connected to the attack reportedly were killed in government raids in the months afterward.

Members of the militant group shout slogans from inside a police van after their sentence was announced Wednesday. (AP)

CLICK HERE TO GET THE FOX NEWS APP

Bangladeshi Prime Minister Sheikh Hasina in 2016 called the café attack “an extremely heinous act.”

"What kind of Muslims are these people? They don't have any religion,” she said during a televised address, according to the BBC.