Catastrophic failure of brittle rocks is important in managing risk associated with system-sized material failure. Such failure is caused by nucleation, growth, and coalescence of microcracks that spontaneously self-organize along localized damage zones under compressive stress. Here we present X-ray microtomography observations that elucidate the in situ micron-scale processes, obtained from novel tri-axial compression experiments conducted in a synchrotron. We examine the effect of microstructural heterogeneity in the starting material (Ailsa Craig microgranite; known for being virtually crack-free) on crack network evolution and localization. To control for heterogeneity, we introduced a random nanoscale crack network into one sample by thermal stressing, leaving a second sample as-received. By assessing the time-dependent statistics of crack size and spatial distribution, we test the hypothesis that the degree of starting heterogeneity influences the order and predictability of the phase transition between intact and failed states. We show that this is indeed the case at the system-scale. The initially more heterogeneous (heat-treated) sample showed clear evidence for a second-order transition: inverse power law acceleration in correlation length with a well-defined singularity near failure and distinct changes in the scaling exponents. The more homogeneous (untreated) sample showed evidence for a first-order transition: exponential increase in correlation length associated with distributed damage and unstable crack nucleation ahead of abrupt failure. In both cases, anisotropy in the initial porosity dictated the fault orientation, and system-sized failure occurred when the correlation length approached the grain size. These results have significant implications for the predictability of catastrophic failure in different materials.Plain Language Summary When rocks deform, tiny cracks appear, increasing in size and number until the rock breaks completely, often along a narrow plane of weakness where cracks have spontaneously aligned. Sometimes, when the microstructure is complicated, cracking accelerates quickly in a predictable way, giving a good indication of when the rock will break. In other cases, when the microstructure is more uniform, cracking accelerates more slowly and the rock breaks suddenly and early. To understand why failure is predictable in some cases but not others-a major problem in managing risk from material failure (e.g., earthquakes)-we used X-ray imaging to see how cracks form and interact with each other inside deforming rocks. We found that predictable behavior only arose when cracks aligned themselves asymmetrically. The orientation of this damage zone was governed by the rock's pre-existing microstructure. We also found distinct changes in crack size and spatial arrangement during alignment, indicating that the rock was approaching failure. However, when cracks did not align asymmetrically, similar changes were not observed and failure was not predictable. Our results are important ...