Stress can affect the establishment and maintenance of social hierarchies. In the present study, we investigated the role of increasing corticosterone levels before or just after a first social encounter between two rats of a dyad in the establishment and the long-term maintenance of a social hierarchy. We show that pre-social encounter corticosterone treatment does not affect the outcome of the hierarchy during a first encounter, but induces a long-term memory for the hierarchy when the corticosterone-injected rat becomes dominant during the encounter, but not when it becomes subordinate. Post-social encounter corticosterone leads to a long-term maintenance of the hierarchy only when the subordinate rat of the dyad is injected with corticosterone. This corticosterone effect mimics previously reported actions of stress on the same model and, hence, implicates glucocorticoids in the consolidation of the memory for a recently established hierarchy.