This paper presents a statistical shape model for automatic skull stripping of MR brain images. A surface model of the brain boundary is hierarchically represented by a set of overlapping surface patches, each of which has elastic properties and deformation range that is learned from a training set. The model's deformation is hierarchical which adds robustness to local minima. Moreover, the deformation of the model is constrained and guided by global shape statistics. The model is deformed to the brain boundary by a procedure that matches the local image structures and evaluates the similarity in the whole patch rather than on a single vertex. The experimental results show high agreement between automatic and supervised skull-stripping results.