The extreme heterogeneity of carbonate reservoirs in the form of fracture corridors and super-permeability thief zones present challenges to the efficient sweep of oil in both secondary and tertiary recovery operations. In such reservoirs, conformance control is crucial to ensure injected water and any EOR chemicals optimally contact the remaining oil with minimal throughput. Foam-based conformance control is a relatively new technology especially its use for deep diversion in high-salinity and high-temperature conditions. In this work, a laboratory study was conducted to develop and evaluate a foam-based conformance control technology for application in a high-salinity and high-temperature carbonate. Foaming agents (surfactants) were first screened for their suitability with regard to reservoir temperature and salinity where properties such as foamability and foam stability were measured. The best performing surfactants were then used to study the foam-induced mobility reduction across a core composite. The experiments were conducted at reservoir conditions. Foam stability and decay were also investigated in those permeability reduction experiments. Brine and crude oil were injected after foam formation where observed pressure drops allowed quantification of foam stability and decay; hence, the sustainability of mobility reduction. Finally, the potential improvement in reservoir contact and hence oil recovery were examined by oil displacement experiments conducted in specially prepared heterogeneous composites. For the studied conditions of high salinity and high temperature, foaming agents of the amphoteric family as well as one manufacturer proprietary surfactants blend were found suitable in terms of salt tolerance and foam stability. Using the proprietary blend and without oil in core, the generated foam reduced fluids mobility by a factor of 12. The attained mobility reduction was lower in presence of oil but was still acceptable for flow diversion purposes. Using the proprietary blend and with oil in core, the generated foam reduced fluids mobility by a factor of 6 (compared to 12 without oil in core). Oil recovery improvement with foam placement was also found to be significant. These results demonstrate the potential of foams for carbonates with harsh salinity and temperature conditions.