Abstract We use novel, fast 4D Synchrotron X‐ray imaging with large field‐of‐view to reveal pore‐ and macro‐scale drainage dynamics during gas–brine flow through a layered sandstone rock sample. We show that a single centimeter‐scale layer, similar in pore size distribution to the surrounding rock but with reduced connectivity, temporarily inhibits, and redirects gas flow, acting as a capillary barrier. Subtle variations in gas invasion upstream of the barrier lead to different downstream migrat