At the late stage of Bashkortostan’s oil field development, well operation is accompanied by corrosion and salt accumulation in the underground equipment. The study of the elemental composition of accumulations and deposits conducted with the help of a «Mini Pal» energy-dispersion X-ray spectrometer allowed to define more accurately the mineral composition of precipitates. Conventional techniques of corrosion and salt accumulation control do not allow to effectively protecting the annular space of wells. A fundamentally new method of equipment protection has been designed and tested that consists in the injection of a corrosion and salt accumulation inhibiting composition in a foamed form in the annular space. Tests of the proposed technology conducted in Arlanskoe field allowed to establish the mechanisms of changes in corrosion rate after treatments and to work through the treatment technology. The carrying out of treatments provided the increase of the effective protection period by 2,3-2,9 times. The use of nitrogen as a foaming agent makes the technology commercially safe and pollution-free.