Localized top of the line corrosion in highly sour environments in the presence of acetic has been reported. However little has been published about the occurrence of localized corrosion in CO2 environments with low H2S concentrations; such conditions are typically described as being marginally sour. This research presents a systematic study of the effect of low H2S concentrations on corrosion of an API 5L X65 carbon steel exposed to top of the line conditions. Special emphasis is given to the transition between sweet and sour corrosion and how it relates to localized corrosion. Experiments were performed at 1 bar total pressure in a CO2/H2S environment. The H2S partial pressure was varied from 0 to 0.15 mbar at two different gas temperatures (40C and 60C). Corrosion rate measurements and surface analyses revealed localized corrosion at H2S partial pressure lower than 0.08 mbar being more severe at a gas temperature of 40C.