Picture used for illustrative purposes only.
The killings occurred in Ankazobe district, about 75 kilometres (47 miles) north of the capital Antananarivo overnight into Friday.
"People here experienced a real tragedy ... many lives were lost. 32 people died. It is a crime perpetrated by ruthless dahalo (bandits) who burned alive even women and children," Defence Minister General Richard Rakotonirina said in a video posted on the ministry's Facebook page late on Saturday said.
The "dahalo" are organised criminal gangs in parts of Madagascar that steal cattle from community members and orchestrate other various forms of banditry.
"We will hunt down those who committed this crime and their accomplices," Rakotonirina said, adding security forces had been deployed to the area to hunt down the perpetrators.
He added the attack on the area was likely revenge by the "dahalo" against community members for providing information to security personnel during previous operations against them.