Madagascar’s army chief was sacked and replaced on Wednesday, the military said, a day after he warned leaders that his troops would take power.