How isolation, intransigence and desperate economic hardship provoked an upsurge of protest that brought the regime to the brink