When an element made up of atoms that readily shed electrons (a metal) reacts with an element made up of atoms that commonly achieve electrons (a nonmetal), a transfer of electrons ordinarily happens, producing ions. The compound formed by this transfer is stabilized by the electrostatic attractions (ionic bonds) between the ions of opposite charge