Conditions for the deposition of MgF 2 (s) from molecular beam source of MgF 2 (s) under a residual atmosphere including water vapor H 2 O(g) are calculated using thermodynamic data of the basic quaternary H-F-Mg-O system. Calculations show that the residual water vapor is gettered on the MgF 2 (s) source during its heating to form MgO(s), without affecting significantly the composition of the deposited films. The interaction of water vapor with the deposited MgF 2 (s) film is negligible for substrates maintained at room temperature meanwhile for a substrate temperature equal to 600K, the MgO(s) formation on the deposited film becomes significant, the ratio MgO(s)/MgF 2 (s) being equal to 1%, a value corresponding approximately to the oxygen content measured experimentally in the deposited films.