This paper deals with the problem of estimating multiple motions at points where these motions are overlaid. We present a new approach that is based on block matching and can deal with both transparent motions and occlusions. We derive a block matching constraint for an arbitrary number of moving layers. Such constraint comes from the theory of motion-based layer separation and can be used for estimating an arbitrary number of overlaid motions. Furthermore, we design a hierarchical algorithm that can distinguish between the occurrence of single, transparent, and occluded motions and can thus select the appropriate local motion model. Performance is demonstrated on image sequences synthesized from natural textures.