Ugandan troops have killed 41 tribal gunmen during a major battle in the western district of Bundibuguyo near the border with the Democratic Republic of Congo, Uganda's army spokesman said.

"There was an attack by tribal gunmen on our barracks in Bundibugyo and we repulsed them, killing so far 41 of the attackers. The operation is ongoing," the army spokesman, Paddy Ankunda, told AFP news agency on Sunday.

"We lost nine rifles to the attackers," he added, but did not disclose if there were any casualties from the army during the fighting, which took place on Saturday.

According to local media reports, however, a soldier and his three children were among the dead.

Ugandan police spokesman, Fred Enanga, also said that one officer was killed in the neighbouring district of Kasese earlier on Saturday when unidentified gunmen attacked a police checkpoint.

The clashes came hours after the army announced it had killed a person suspected of involvement in an attack by Muslims two weeks ago at a church in the border region, during which a woman was decapitated and her head placed on the altar.

Both the army and police denied the attacks were related to any rebel group, instead blaming local tribal and communal tensions.