We use density functional theory ͑DFT͒ and the tight-binding ͑TB͒ method to study the relaxation of narrow Cu, Ni, Au, Pt, and Ag nanowires originally oriented in the ͗001͘ direction with a fcc structure. For a small enough diameter ͑d Ͻ 2 nm͒ each nanowire, under the compressive influence of its own surface stress, spontaneously relaxes to either a ͗110͘ orientation ͑Cu, Ni, Ag͒ or to a bct ͗001͘ orientation ͑Au, Pt͒, both of which are characterized by a compression of the wire axis of at least 30%. To analyze the stability of bct structures, we calculate the elastic constants for the bct phases of these metals under bulk, slab, and nanowire conditions. DFT predicts that only the bct phase in Pt is stable with respect to shear distortions in both the bulk and in nanowires. We find that the surface contribution to the elastic constant for shear, C 66 , helps stabilize the bct phase in Au which would otherwise be unstable under bulk conditions. A large stabilization contribution from the surface also occurs in Ni and Cu, but not enough to overcome the shear instability in the bulk, and these nanowires do not transform to bct, although Cu is nearly stable for very narrow nanowires of width ϳ1 nm. We discuss the interplay of surface and edge effects in the phase change or reorientation of these nanowires and implications of these results on pseudoelasticity or shape memory in fcc metals.