The government and police accused the hard-line Jamayetul Mujahideen, which wants to introduce strict Islamic law in the Muslim-majority democracy, of staging the attacks targeting the legal system.
"Jamayetul Muhahideen is using Islam's name to kill people. The government has taken a hard stand and will now take an even harder stand," Bangladeshi Prime Minister Khaleda Zia said during a visit to the south.
"This is the first suicide attack in Bangladesh," national police chief Abdul Kaiyum said after the blasts in the south-eastern port city of Chittagong and in Gazipur near the capital Dhaka.
"These were powerful home-made bombs. It seems Jamayetul Mujahideen have stepped up their attacks after we arrested many of their members."
The attacks came two days after security was tightened around embassies in Dhaka following a faxed message in the name of "al Qaeda in South Asia".
Tuesday's first attack was at Chittagong's main court where three people - a suicide bomber and two police officers - died. Five police officers and another would-be suicide bomber were seriously injured, police said.
A Jamayetul Mujahideen activist hurled a bomb into the court and then blew himself up after approaching a police stand at the court, police sub-inspector Rahul Amin said. The second attack targeted the bar association in Gazipur where a suicide bomber wearing lawyers' robes and four others died. Seventeen people were also seriously wounded, Gazipur police officer-in-charge Kamrul Islam told AFP.
Two seriously injured people died late Tuesday in Dhaka Medical College to bring the death toll to 10, duty doctor Arif Hossain told AFP. The surviving bomber was in intensive care in hospital in Chittagong.
"I attacked the Chittagong court by the order of Allah," said Abul Bashar, 19, who lost both legs as he detonated a bomb strapped to his body. "I did not do any wrong in carrying out the suicidal attack," he told the official BSS news agency from his hospital bed. "I did the right thing."
Before the latest blasts Jamayetul Mujahideen had been linked to a wave of attacks on courts and other official buildings nation-wide that had killed seven people since August, including two judges earlier this month.
Leaflets bearing the group's name and calling for Islamic law have been found at previous blast sites. A similar leaflet was found at the scene of Tuesday's blast in Chittagong, police said.