Militants have seized most of a key Shiite majority town in northern Iraq, a government official said on Tuesday, in fighting that has killed dozens of civilians and combatants.