a method for reducing the permeability in a desired area of a formation wherein a foamed gel is formed in - situ by injecting a solution into said formation . said solution comprises a gellable composition including water ; a cross linkable polysaccharide biopolymer ; an aminoplast resin which reinforces said biopolymer ; and sufficient transitional metal ions to form a gel of the desired size and strength . the gelled solution is foamed by including therein a chemical surfactant , and a chemical blowing agent . once in the formation to the desired depth , the chemical blowing agent decomposes and generates a gas sufficient to foam the gelled solution . the gelled foam stiffens and reduces the permeability in a desired area .