Rebels battled Moroccan troops over control of Western Sahara for 16 years , following the withdrawal of colonial power Spain .