The quantitative analysis of cardiac cine MRI sequences requires automated, robust, and fast image processing algorithms for the 4D (3D + time) segmentation of the heart chambers. The use of shape models has proven efficient in extracting the cardiac volumes for single phases, but less attention has been focused on incorporating prior knowledge about the cardiac motion. To explicitly address the temporal aspect of the segmentation problem, this paper proposes a full Bayesian model, where the prior information is represented by a cardiac shape and motion model. In this framework, the solution of the segmentation is defined by means of a probability distribution over the parameters of the space-time problem. The computed solution, obtained by means of sequential Monte Carlo techniques, has the advantage of being both spatially and temporally coherent. Furthermore, the method does not require any particular representation of the shape or of the motion model; it is therefore generic and highly flexible.