Lead-free solder alloys based on a Sn--Ag--Mg system are disclosed. The
alloy compositions have a melting temperature close to 183.degree. C. and
a similar surface tension to that of Sn--Pb solder, and can thus be a
readily substituted for conventional Sn--Pb solders. P may be added to the
alloy compositions to reduce its tendency of oxidation.