A guerrilla war with the Polisario Front contesting Morocco 's sovereignty ended in a 1991 UN-brokered cease-fire ; a UN-organized referendum on the territory 's final status has been repeatedly postponed .