Abstract. Accurate registration of images depicting respiratory motion, e.g. 4DCT or 4DMR, can be challenging due to sliding motion that occurs between the chest wall and organs within the pleural sac (lungs, mediastinum, liver). In this paper we propose a methodology that (1) segments one of the images to be registered (the source or floating/moving image) into two distinct regions by fitting a statistical motion mask, and (2) registers the image with a modified B-spline registration algorithm that can account for sliding motion between the regions. This registration requires the segmentation of the regions in the source image domain as a signed distance map. Two underlying transformations allow the regions to deform independently, while a constraint term based on the transformed distance maps penalises gaps and overlaps between the regions. Although implemented in a B-spline algorithm, the required modifications are not specific to the transformation type and thus can be applied to parametric and non-parametric frameworks alike. The registration accuracy is evaluated using the landmark registration error on the basis of the publicly available DIR-Lab dataset. The overall average landmark error after registration is 1.21mm and the average gap and overlap volumes are 26.4cm 3 and 34.5cm 3 respectively. The fitted statistical motion masks are compared to previously proposed motion masks and the corresponding mean Dice coefficient is 0.96.