At the root of righteousness is spirituality.
You cannot be truly righteous unless you are spiritually deep.
To become immeasurably righteous, you have got to be immensely deep in the spirit. Gal.5:16
A walk in the spirit will save you from carnality.
The deeper the fish is in the waters the farther away he is from danger. So also it is for the believer. The deeper he is in the spirit, the farther away and safer he is from sin.
Dwell in the spirit and you will not get drawn into sin.