Abstract. We propose a new algorithm for two-phase, piecewise-smooth segmentation with shape prior. The image is segmented by a binary template that is deformed by a regular geometric transformation. The choice of the template together with the constraint on the transformation introduce the shape prior. The deformation is guided by the maximization of the likelihood of foreground and background intensity models, so that we can refer to this approach as Competitive Deformation. In each region, the intensity is modelled as a smooth approximation of the original image. We represent the transformation using a Partition of Unity Finite Element Method, which consists in representing each component with polynomial approximations within local patches. A conformity constraint between the patches provides a way to control the globality of the deformation. We show several results on synthetic images, as well as on medical data from different modalities.