Bosnia's state prosecution office says it is investigating the killing of two soldiers in Sarajevo as terrorism.

Spokesman Boris Grubesic told the AP Thursday that the previous night's killing spree near a military barracks is being investigated as "an act of terrorism."

A man armed with an automatic rifle killed two Bosnian soldiers in a betting shop and then shot at a public bus. Fragments of the broken glass injured the driver and two passengers.

The suspect then fled to his home nearby and blew himself up, police said.

Prime Minister Denis Zvizdic said after a late-night emergency session of his cabinet it was "an attack on the state."