Multiphase flow in porous media is important in many natural and industrial processes, including geologic CO 2 sequestration, enhanced oil recovery, and water infiltration into soil. Although it is well known that the wetting properties of porous media can vary drastically depending on the type of media and pore fluids, the effect of wettability on multiphase flow continues to challenge our microscopic and macroscopic descriptions. Here, we study the impact of wettability on viscously unfavorable fluid-fluid displacement in disordered media by means of high-resolution imaging in microfluidic flow cells patterned with vertical posts. By systematically varying the wettability of the flow cell over a wide range of contact angles, we find that increasing the substrate's affinity to the invading fluid results in more efficient displacement of the defending fluid up to a critical wetting transition, beyond which the trend is reversed. We identify the pore-scale mechanisms-cooperative pore filling (increasing displacement efficiency) and corner flow (decreasing displacement efficiency)-responsible for this macroscale behavior, and show that they rely on the inherent 3D nature of interfacial flows, even in quasi-2D media. Our results demonstrate the powerful control of wettability on multiphase flow in porous media, and show that the markedly different invasion protocols that emerge-from pore filling to postbridging-are determined by physical mechanisms that are missing from current pore-scale and continuum-scale descriptions.porous media | capillarity | wettability | microfluidics | pattern formation M ultiphase flow in porous media is important in many natural and industrial processes, including geologic CO 2 sequestration (1), enhanced oil recovery (2), water infiltration into soil (3), and transport in polymer electrolyte fuel cells (4). Much of the research on multiphase flow in porous media has focused on the effect of fluid properties and flow conditions. Much less emphasis has been given to the fluids' affinity to the porous media (i.e., wettability), even though wettability has a profound influence on fluid-fluid interactions in the presence of a solid surface (5-7). Despite recent advances in our ability to accurately measure wettability under reservoir conditions (8, 9), and to engineer wettability in the subsurface (10-13), the complex physics of wetting continues to challenge our microscopic and macroscopic descriptions (14).Fluid-fluid displacement in the presence of a solid surface can be characterized as either drainage or imbibition, depending on the system's wettability. Drainage refers to the regime where the invading fluid is less wetting to the solid surface than the defending fluid. Imbibition refers to the opposite case, where the invading fluid is more wetting to the solid surface than the defending fluid. Drainage in porous media has been studied extensively through laboratory experiments and computer simulations (15-18), and we now have a fairly good understanding of the different displacement ...