It was recently proposed that the stress state of a material can also be altered via electron or hole doping, a concept termed electronic stress (ES), which is different from the traditional mechanical stress (MS) due to lattice contraction or expansion. Here we demonstrate the equivalence of ES and MS in structural stabilization, using In wires on Si(111) as a prototypical example. Our systematic density-functional theory calculations reveal that, first, for the same degrees of carrier doping into the In wires, the ES of the high-temperature metallic 4×1 structure is only slightly compressive, while that of the low-temperature insulating 8×2 structure is much larger and highly anisotropic. As a consequence, the intrinsic energy difference between the two phases is significantly reduced towards electronically phase-separated ground states. Our calculations further demonstrate quantitatively that such intriguing phase tunabilities can be achieved equivalently via lattice-contraction induced MS in the absence of charge doping. We also validate the equivalence through our detailed scanning tunneling microscopy experiments. The present findings have important implications in understanding the underlying driving forces involved in various phase transitions of simple and complex systems alike.