“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.”
The authorities said two members of the police force were killed and six attackers were captured.
Burundi has been wracked by political violence since 2015, when President Pierre Nkurunziza ran for a disputed third term in office.
Hundreds were killed in a crackdown by security forces and more than 400,000 displaced, most to Tanzania, Rwanda, and the Democratic Republic of Congo.
This year election will choose a successor to President Pierre Nkurunziza.
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.
In a report published last month, the Burundi Human Rights Initiative said CNL supporters had been beaten to death by members of the ruling party’s youth wing, the Imbonerakure, and buried in secret cemeteries.
“Serious human rights violations continued in 2019, but were often hidden and quickly covered up, making it difficult to establish the circumstances in which they took place,” the report said.
The United Nations has warned that human rights abuses may increase again before the elections scheduled for May.