Magnesium protects tantalum, a promising material for making