Magnesium reacts with oxygen gas to form magnesium oxide.