Pretreating with metals or metal-containing compounds with magnesium or compounds thereof {halides of magnesium}