The authorities said two members of the police force were killed and six attackers were captured. They gave few further details about the nature of the unrest.
"Wrongdoers took advantage of this electoral period thinking people are distracted," police spokesman Pierre Nkurikiye said on the state broadcaster RTNB. "The population should remain calm because security officers are ensuring its security."
Burundi, which has a similar ethnic composition to neighbouring Rwanda, has suffered from decades of ethnic and political violence, including a 1993-2005 civil war in which 300,000 people died, mostly civilians.
The election in May will chose a successor to President Pierre Nkurunziza, a former rebel leader who has held power since 2005. His three terms in office have seen sporadic violence and international accusations of human rights abuses, which his government denies.
The ruling CNDD-FDD party's candidate, Evariste Ndayishimiye, a retired army general who heads the department of military affairs in the president's office, faces a former rebel leader, Agathon Rwasa, of the opposition CNL party. (Editing by Peter Graff)
epa05068058 A Burundian expatriate woman holds a placard reading 'Burundi bleeds' during a candlelight vigil held for Burundi in Nairobi, Kenya, 13 December 2015. Kenyan activists and Burundians residing in Kenya held a candlelight service to call for peace in Burundi, that has been gripped by violence between police and protesters since April, when President Pierre Nkurunziza announced he would seek a third term in office. Human rights activists say more than 240 people have been killed in protests and attacks since April, while more than 220,000 are believed to have fled the country. EPA/DAI KUROKAWA