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 neighboring 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.