A process for improving the water and nutrient retention of soil for agriculture, which comprises forming a barrier layer of a clay mineral-polymer gel at a level under the surface of the soil, or forming in situ at a level under the surface of the soil a moisture barrier layer that can be penetrated by the roots of plants, said barrier layer being formed from a gel that is the reaction product of a clay mineral and a water soluble polymer that can enter into a chemical reaction with said clay mineral, wherein the clay mineral-polymer gel is formed by mixing in the presence of water, at said level under the surface of the soil, an activated or nonactivated clay mineral, with one or more water soluble polymers adapted to react with the clay mineral, adjusting the water content, activating the clay mineral if a nonactivated clay mineral was employed, and if the barrier layer was formed while uncovering the level under the surface of the soil, then covering the uncovered part of the gel layer with soil.