There is no doubt that the resistance of the conscious and unconscious ego operates under the sway of the pleasure principle: it seeks to avoid the unpleasure which would be produced by the liberation of the repressed.
The Standard Edition of the Complete Psychological Works of Sigmund Freud (ed. 1955)