A gunman was killed in the attack on the police station in the town of Zvornik, Aleksandra Simojlovic, a police spokeswoman said.

"The attacker broke into the station and started a shooting spree," Aleksandra Simojlovic told Reuters.

Security Minister Dragan Mektic added that the gunman stormed into the building with an automatic rifle and was killed in crossfire with police inside.

The attack occurred at around 7 p.m. (1700 GMT) in Zvornik, a town in Bosnia's Serb-dominated autonomous region, the Serb Republic.

"This is the worst terrorism attack that could happen in the Serb Republic," regional Interior Minister Dragan Lukac told local television, adding that security level had been raised after the attack.

The Bosnian Serb government will hold an overnight emergency session and the regional president, Milorad Dodik, told Bosnian Serb TV that the attacker was instructed by someone else, even though he acted alone.

Bosnian Serb police chief Dragan Lukac called on local residents to help the police.

"We will fight against them and we will never forgive them, but police can't do it alone. We need the citizens to help," Lukac said.

The imam of the Zvornik mosque, Mustafa Muharemovic, condemned the attack.

Zvornik is a town in the Bosnian Serb part of the country and it is located at the border with Serbia. During the 1992-95 war, thousands of Bosnian Muslims were expelled from Zvornik by Serb forces during the war but some have since returned.

Most Bosnian Muslims practice a moderate form of Islam but some have embraced the ideology of the Sunni Wahhabi sect and the government estimates that up to 200 have travelled to Syria and Iraq to fight for Isis, also known as the Islamic State group.