Two soldiers and a civilian were killed on Wednesday when gunmen attacked the village of Goundam in northern Mali, an army spokesman and local residents said, amid rising tensions after two days of clashes between pro- and anti-government militia.

The separatist rebel umbrella organization, the Coordination of Azawad Movements (CMA), said in a statement on Tuesday it would defend itself after the Gatia militia favorable to Bamako seized the northern town of Menaka.

"At around 5:30 am this morning, armed men attacked the village of Goundam," Souleymane Maiga, head of the army's information office, said. "The provisional toll is three dead including the head of the national guard unit, his deputy, and acivilian."

One local resident said the gunmen entered the town firing their weapons and went to the headquarters of the national guard detachment, where they shot its head, his deputy and his nephew. Residents said the attackers appeared to be separatist rebels but it was not immediately possible to confirm this.

The violence came after separatist fighters shot at U.N.peacekeepers outside the town of Timbuktu in northern Mali onTuesday. The CMA claimed the attack.

The United Nations, which has a 10,000-strong peacekeeping mission in Mali, said on Tuesday that escalating tensions threatened to derail an Algerian-brokered peace agreement between President Ibrahim Boubacar Keita's government and therebels, due to be signed next month.

The peace deal is aimed at stopping a cycle of uprisings innorthern Mali over the past five decades by mainly Tuareg rebels fighting for independence from the government in the south.

In the most recent uprising in 2012, separatists joined forces with Islamist militants to briefly seize control of the northern two-thirds of the country before a French-led military intervention rolled them back.

Mali is a former French colony. Diplomats hope a peace deal would allow Malian and international forces to concentrate on tackling al-Qaida-linked Islamist fighters roaming the lawless desert region.