One Cameroonian soldier also lost his life in the clashes, Communications Minister and government spokesman Issa Tchiroma Bakary said yesterday in a statement read out on television and radio.
The toll was "the heaviest loss yet" suffered by Boko Haram on Cameroonian soil, he said, and comes at a time of fears of increased cross-border raids by the Nigeria-based group into Cameroon, Chad and Niger.
The spokesman said the attack began in the early hours when "several hundred" Islamist fighters took advantage of thick fog to cross over from Nigeria and tried to storm the town's military base, where an elite army unit is stationed.
A local source said residents fled "as soon as people heard the first gunfire" in the town.
Also Read
The attack on Kolofata comes after the group's leader Abubakar Shekau vowed last week in a YouTube message to hit back at Cameroon for sending warplanes into action against the fighters in December after they seized a military camp.
Yesterday's offensive was the first by Boko Haram on the town since the army's elite Rapid Intervention Battalion was deployed to defend the area after deadly attacks in 2014.
The insurgency by Boko Haram, which is fighting to create a hardline Islamic state in northeastern Nigeria, has left more than 13,000 dead and 1.5 million displaced since 2009.
The group has seized dozens of towns and villages in northeast Nigeria in the last six months and now reportedly controls large parts of Borno state, which borders Niger, Chad and Cameroon.
Meanwhile in the Borno state town of Baga, a resident yesterday said he saw "corpses everywhere" following a major assault by the militants there last week.