Surfactant-polymer (SP) and alkali-surfactant-polymer (ASP) flooding is of great current interest owing to the need to recover oil left behind after primary and secondary recovery. If designed properly, these enhanced oil recovery processes can give very high oil recoveries. Microemulsion phase behavior plays a central role in process performance and is typically measured by doing salinity scans in glass pipettes at atmospheric pressure and reservoir temperature using dead crude oil from the reservoir of interest. There have been only a few experiments reported in the literature on live oil at reservoir pressure and temperature and the importance of those experimental results are conflicting. This paper investigates the effect of pressure, temperature, and solution gas on microemulsion phase behavior and its impact on oil recovery. We examine previous data reported in the literature, and report new measurements with live oil to show that the optimum parameters can change significantly. The experiments show that while pressure induces a phase transition from upper microemulsion (Winsor type 11+) to lower microemulsion (Winsor type II-), solution gas does the opposite. An increase in pressure decreases the optimum solubilization ratio and shifts the optimum salinity to a larger value. Adding methane to dead oil at constant pressure does the reverse. Thus, these effects are coupled and both must be taken into account. We derive a new thermodynamic model to explain why the logarithm of oil and water solubilization ratios is linear with pressure or inverse temperature. We also use a numerical simulator to show how to design the chemical processes to account for phase behavior shifts with pressure and solution gas to achieve good oil recovery.