Quantitative mechanical testing of single-crystal GaAs nanowires was conducted using in situ deformation transmission electron microscopy. Both zinc-blende and wurtzite structured GaAs nanowires showed essentially elastic deformation until bending failure associated with buckling occurred. These nanowires fail at compressive stresses of ∼5.4 GPa and 6.2 GPa, respectively, which are close to those values calculated by molecular dynamics simulations. Interestingly, wurtzite nanowires with a high density of stacking faults fail at a very high compressive stress of ∼9.0 GPa, demonstrating that the nanowires can be strengthened through defect engineering. The reasons for the observed phenomenon are discussed.