A Bangladesh court Thursday upheld the death sentence for six Islamist militants convicted over a suicide bombing in 2005 of a lawyer's office that killed eight people, a top prosecutor said.

Bangladesh's judiciary is under pressure to fast track cases involving militants as the government faces mounting criticism to crackdown on Islamists over a series of recent deadly killings.

A bench of two high court judges rejected appeals from the six convicted over the 2005 bombing, claimed by local extremist group Jamayetul Mujahideen Bangladesh (JMB).

"The court upheld the death orders against the six JMB extremists as the charges against them were proved beyond any doubt," deputy attorney general Sheikh A.K.M. Moniruzzaman told AFP.

JMB has also been blamed for a siege this month by five gunmen on an upscale cafe in Dhaka that killed 20 mostly foreign hostages and two police officers.

Police have rejected the Islamic State (IS) group's claim for the July 1 attack. The group posted gruesome images of the carnage before the military stormed the cafe.

Moniruzzaman said the six convicted militants had conspired and assisted in the bombing of the lawyer's office just north of Dhaka, part of JMB's then deadly campaign against the secular judiciary.

"Of the ten JMB extremists originally sentenced to death by the trial court in 2013, two were acquitted by the high court and two others were sentenced to life in prison," he added.

The attack was one of a series of blasts the JMB carried out in 2005, then raising fears that the Muslim-majority nation would descend into Afghanistan-style Islamic militancy.

Four lawyers and four litigants died in the attack. The suicide bomber was also killed.

Authorities launched a crack down on the JMB at the time, but it has regrouped in recent years under new leaders. According to experts, it has been actively recruiting young and highly educated young men to its ranks.

Police have blamed the banned group for scores of gruesome murders of religious minorities, as well as of foreigners, since 2013.