This work studies oil displacement by gas and foam in a fractured lowpermeability oil-wet carbonate rock. In the three experiments conducted, gas is a methane−ethane mixture whose ethane mole fractions are 0.25, 0.50, and 0.65 (nearmiscible), respectively. We use calibrated in situ μCT to quantify oil saturation evolution in the fracture and the matrix and observe pore-scale displacements. As the ethane mole fraction in gas increases, gas−oil interfacial tension (IFT) and capillary pressure decrease and residual oil in the fracture pores after gas injection retreats from pore to throat and then to grain contact. With decreasing IFT, residual oil saturation after gas (S org ) decreases from 24% to 15% and to 3% in the fracture and decreases from 76% to 60% and to 12% in the matrix, respectively. Higher S or in the matrix is due to the matrix permeability being orders of magnitude lower than the fracture permeability. During foam flow, foam ruptures in the fracture pores and at the fracture−matrix interface when foam contacts oil or enters pores less than half of the foam bubble size (100−150 μm). As a result, gas is delivered into the matrix; gas pressure released from ruptured bubbles mobilizes oil, decreasing S or after foam to at most 56%, 23%, and 6%, respectively for the three experiments. Particularly, matrix oil saturation after gas and foam is radially uniform for the near-miscible gas but increases radially from the fracture−matrix interface for gases with higher IFT. This suggests oil displacement by near-miscible gas and foam benefits from the synergy of low-IFT capillary invasion and mass transfer across gas−oil interfaces.