An attack in northern Benin killed 28 government troops, AFP said in a post on X on Thursday, citing a military source.