a b s t r a c tDriven by the rapid progress in exploiting unconventional energy resources such as shale gas, there is growing interest in hydraulic fracture of brittle yet heterogeneous shales. In particular, how hydraulic cracks interact with natural weak zones in sedimentary rocks to form permeable cracking networks is of significance in engineering practice. Such a process is typically influenced by crack deflection, material anisotropy, crack-surface friction, crustal stresses, and so on. In this work, we extend the He-Hutchinson theory (He and Hutchinson, 1989) to give the closed-form formulae of the strain energy release rate of a hydraulic crack with arbitrary angles with respect to the crustal stress. The critical conditions in which the hydraulic crack deflects into weak interfaces and exhibits a dependence on crack-surface friction and crustal stress anisotropy are given in explicit formulae. We reveal analytically that, with increasing pressure, hydraulic fracture in shales may sequentially undergo friction locking, mode II fracture, and mixed mode fracture. Mode II fracture dominates the hydraulic fracturing process and the impinging angle between the hydraulic crack and the weak interface is the determining factor that accounts for crack deflection; the lower friction coefficient between cracked planes and the greater crustal stress difference favor hydraulic fracturing. In addition to shale fracking, the analytical solution of crack deflection could be used in failure analysis of other brittle media.