A shape memory alloy comprises Co, Ni and Al with a two-phase structure
comprising a .beta.-phase having a B2 structure and a .gamma.-phase
having an fcc structure, at least 40% by area of crystal grain boundaries
of the .beta.-phase being occupied by the .gamma.-phase. The shape memory
alloy can be produced by a first heat treatment step comprising heating
at 1200 to 1350.degree. C. for 0.1 to 50 hours and cooling at 0.1 to
1000.degree. C./minute, and a second heat treatment step comprising
heating at 1000 to 1320.degree. C. for 0.1 to 50 hours and cooling at 10
to 10000.degree. C./minute.