An oil filter for an internal combustion engine with a cup-shaped housing that is releasably connectable to a receiving head. The housing has a first interlocking element that extends across at least a portion of the outer circumference of the housing and is interrupted by at least one axially extending recess. The filter element has a liquid-tight canister provided on its outer surface with second interlocking elements, which fit into the recesses of corresponding first interlocking elements when the filter element is installed in the housing.