A suite of true triaxial tests were performed on Castlegate sandstone to assess the influence of the intermediate principal stress on mechanical response and failure. Five independent deviatoric stress states were employed, for which the intermediate principal stress ranged from equal to minimum compression (axisymmetric compression) to maximum compression (axisymmetric extension). For each deviatoric stress state, five constant mean stress tests were conducted, covering mean stresses ranging from brittle to ductile failure. At low mean stresses, shear bands formed, and the peak stress required to induce failure decreased with increasing intermediate principal stress. Thus, failure at low mean stresses depends on the third invariant of deviatoric stress. Shear bands formed under all deviatoric stress states and over a wide range of mean stresses. The band angle (defined as the angle between the band normal and the direction of maximum compression) decreased with increasing mean stress. There was no clear trend in band angle with respect to intermediate principal stress; however, a small trend would be obscured by data scatter due to specimen variability. At higher mean stresses, no localization was observed. The upper bound mean stress at which shear localization occurred increased with increasing intermediate principal stress. Therefore, the mean stress that demarcates the brittle-ductile transition depends on the third invariant of deviatoric stress.