We identify a distinct two-phase flow invasion pattern in a mixed-wet porous medium. Time-resolved highresolution synchrotron X–ray imaging is used to study the invasion of water through a small rock sample filled with oil, characterized by a wide non-uniform distribution of local contact angles both above and below 90 . The water advances in a connected front, but throats are not invaded in decreasing order of size, as predicted by invasion percolation theory for uniformly hydrophobic systems. Instead, we observe pinning of the three-phase contact between the fluids and the solid, manifested as contact angle hysteresis, which prevents snap-off and interface retraction. In the absence of viscous dissipation, we use an energy balance to find an effective, thermodynamic, contact angle for displacement and show that this angle increases during the displacement. Displacement occurs when the local contact angles overcome the advancing contact angles at a pinned interface: it is wettability which controls the filling sequence. The product of the principal interfacial curvatures, the Gaussian curvature, is negative, implying wellconnected phases which is consistent with pinning at the contact line while providing a topological explanation for the high displacement efficiencies in mixed-wet media.