X-ray computed microtomography (XMT) was used to understand why a Cr(III)-acetate-HPAM gel reduced permeability to water 80-90 times more than that to oil in strongly water-wet Berea sandstone and in strongly oil-wet porous polyethylene. During oil flow after gel placement in Berea, a 55% (average) reduction in gel volume occurred in pores of all detected size ranges, thus leading to a relatively high permeability to oil. In porous polyethylene, reduction in gel volume occurred mainly in small pores. Because the first oil injection after gel placement did not reduce gel volume to a greater extent in large pores than in small pores, the reduction in gel volume was probably caused by gel dehydration rather than by gel ripping or extrusion. The overall Sor in Berea jumped from 18.4% before gel placement to 51% after. The greater level of trapped oil greatly restricted water flow. Before gel placement, most residual non-wetting blobs were isolated within individual pores. In Berea at Sor after gel placement, the largest residual oil blob was 122 times larger than the largest oil blob at Sor before gel placement. This high degree of connectivity for the oil phase explains the relatively high permeability to oil after gel placement. This large blob may exist because gel affinity for water limited the formation of water films that were needed to break the large oil blob into small blobs. In porous polyethylene, the overall Sor was significantly lower after gel placement than before gel placement (0.3% versus 17.0%). Thus, oil trapping could not explain the large disproportionate permeability reduction (Frrw/Frro=89). Gel dehydration and rehydration provide a viable explanation. In particular, paths may open during oil injection by partial dehydration of the gel. During subsequent water injection, the paths could partially close when the gel rehydrates.