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 micro-cracks that spontaneously self-organize along localized damage zones under compressive stress. Here we present x-ray micro-tomography 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 micro-granite; known for being virtually crack-free) on crack network evolution and localization. To control for heterogeneity, we introduced a random nano-scale 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.