The transformation of impure mud