Abstract:The Lower Triassic formation in Block 9 of the Tahe Oilfield is characterized by high temperature (108?°C), ultra-high salinity (21.8×10??mg/L), and is currently undergoing development at a high water cut stage. Although N? foam flooding has demonstrated significant potential for enhancing oil recovery in this reservoir, its effectiveness in establishing long-term flow resistance in water-channeling pathways remains short-lived. To address this limitation, a novel foam system (TLBO) was developed, and its gas-liquid injection ratio in an oil-bearing environment were systematically optimized. The TLBO system—comprising an anionic–nonionic hydrocarbon surfactant, fluorocarbon surfactant, and modified biopolymer—leverages synergistic effects in viscoelasticity enhancement and interfacial stabilization. Under oil saturations of up to 40%, TLBO exhibited less than a 4% decrease in foam volume and a 35% reduction in drainage half-life, while maintaining a foam half-life exceeding five hours. After aging for three months under reservoir temperature and salinity conditions, the system still generated stable foam at 20% oil saturation. Experimental results revealed that crude oil had a more pronounced detrimental effect on foam performance in porous media than in bulk phase. Consequently, the previously optimal gas–liquid ratio of 5:1 (established under oil-free conditions) failed to provide effective mobility control in the presence of oil. By reducing the gas–liquid ratio, the effective viscosity of the TLBO foam increased significantly. Notably, below a residual oil saturation of 13%, adjusting the gas–liquid ratio to 1:2 restored the foam"s mobility control performance to a level comparable with that observed in oil-free conditions. These findings provide critical insights into the design and field application of foam systems for high-temperature, high-salinity reservoirs, and support improved recovery efficiency in challenging reservoirs such as those in the Tahe Oilfield.