Article provides a brief overview of the complications arising during the construction of oil and gas wells in conditions of abnormally high and abnormally low formation pressures. Technological properties of the solutions used to eliminate emergency situations when drilling wells in the intervals of catastrophic absorption and influx of formation fluid have been investigated. A technology for isolating water influx in intervals of excess formation pressure has been developed. The technology is based on the use of a special device that provides control of the hydrodynamic pressure in the annular space of the well. An experiment was carried out to determine the injection time of a viscoelastic system depending on its rheology, rock properties and technological parameters of the isolation process. A mathematical model based on the use of a special device is presented. The model allows determining the penetration depth of a viscoelastic system to block water-bearing horizons to prevent interformation crossflows and water breakthrough into production wells.