We consider the Casimir effect, by calculating the Casimir energy and its corrections for nonzero temperatures, of a massless scalar field in the spacetime with topology S 3 × R 1 (Einstein universe) containing an idealized cosmic string. The obtained results confirm the role played by the identifications imposed on the quantum field by boundary conditions arising from the topology of the gravitational field under consideration and illustrate a realization of a gravitational analogue of the Casimir effect. In this backgorund, we show that the vacuum energy can be written as a term which corresponds to the vacuum energy of the massless scalar field in the Einstein universe added by another term that formally corresponds to the vacuum energy of the electromagnetic field in the Einstein universe, multiplied by a parameter associated with the presence of the cosmic string, namely, λ = (1/α) − 1, where α is a constant related to the cosmic string tension, Gµ.Int. J. Mod. Phys. D Downloaded from www.worldscientific.com by CAMBRIDGE UNIVERSITY on 06/13/16. For personal use only.