Insurgents killed 17 soldiers and wounded nearly 24 in the first major attack in half a year against the army in Niger, where Western powers fear a coup by the elite presidential guard last month is weakening a rare ally against jihadi violence in West Africa's Sahel region.