through the open PEO pores 30-32. However, the LDH growth on PEO treated magnesium alloys is not so simple due to the complicity of the system, even if noticeable effect for corrosion protection is expected 33,6. Recently, Zeng et al. suggested a two-step synthesis of Zn,Al-LDH coating on anodized AZ31 alloy 34. In that work the preliminary synthesized LDH containers were deposited on the surface of PEO layer by immersion AZ31 sample in the LDH containing solution at autoclave conditions and further covered with poly(lactic acid) coating (PLA). An overall significant improvement of corrosion properties was observed for both LDH and LDH/PLA covered samples in comparison with bare AZ31. Wu et al. proposed direct hydrothermal synthesis of Mg,M-LDH films (M = Al, Cr, Fe) on anodized AZ31 with the oxide layer acting as the source of magnesium 35,36. The same approach was used by Zhang et al. for anodized and PEO-treated AZ31 samples 37-39. In brief, these existing single-step approaches for LDH sealing of oxidized magnesium alloys are performed in autoclaves since they require high pressure conditions and temperatures above 100 °C, which significantly limits the possibility of industrial applications of those methods, e.g. for transport applications. In the cases, when autoclave conditions are not required, LDH formation takes place in carbonated electrolytes 40,41 and CO 2 containing environment due to high sorption ability of LDH towards CO 2 42. These LDH are extremely hard to functionalize due to the high charge density of carbonate species 43,44. Thus, formation of "dead" LDH occurs and corrosion inhibitors cannot be intercalated for further "smart" active protection. Overall, LDH sealing of PEO layers is significantly more problematic in the case of magnesium in comparison with aluminum alloys. Recently, Shulha et al. have demonstrated the possibility of Mg,Al-LDH formation on bare AZ91 magnesium alloy via application of chelating agents 45. Introduction of chelating agents to the reaction system led to the formation of soluble metal complexes and therefore to the increase of concentration of soluble Al(III) and Mg(II) species in the pH range of 9.6-10.3, which is favourable for LDH growth. In this work, sodium salts of salicylic, ethylenediaminetetraacetic and nitrilotriacetic acids were chosen with different complex stability constants with magnesium (log K Mg-L) of 4.7, 8.64 and 10.2, respectively. It was shown, that in the solutions containing chelating agents the concentration of soluble forms of magnesium (as Mg 2+ ions and Mg 2+-ligand complexes) was maintained relatively high in the pH range necessary for LDH formation (ca. 50% of free Mg 2+ in the case of nitrilotriacetic acid (NTA) chelating agent addition). No external source of magnesium ions was added to the electrolyte. Instead, chelating agents assisted the dissolution of the substrate, providing enough soluble magnesium species for LDH formation. This approach allowed the formation of LDH flakes on the surface under relatively mild conditions (95...