Friendly fire killed five members of the Sudanese security forces Thursday in South Kordofan state, where troops are battling an insurgency, the military said.
Guards protecting a local district chief "erroneously opened fire on a patrol of the armed forces," spokesman Sawarmi Khaled Saad was quoted by the official SUNA news agency as saying.
The resulting exchange of fire left a total of five dead, he said.
The shooting happened near Dilling, in the north of the state.
For two years the government has been battling rebels of the Sudan People's Liberation Army-North (SPLA-N) in South Kordofan.
On Tuesday, the insurgents claimed their first major attack of the dry season with an ambush of a government convoy outside Dilling town.
The military has said nothing about the claimed attack, which rebels said left "many dead bodies".