Abstract: A method and a system for removing dispersed and dissolved hydrocarbons from produced water in connection with the extraction of oil and gas from geological formations beneath the sea bed or the ground. The produced water first undergoes mechanical or electromechanical treatment in a sub-process “A” to remove the dispersed hydrocarbons from the water and is subsequently treated in a sub-process “B” by stripping with a circulating inert gas in one or more stages (1, 2) to remove the dissolved hydrocarbons. The inert gas consists expediently of N2 containing 02 and the subsequent removal of the hydrocarbons is carried out in a catalytic converter (5) by catalytic combustion of the stripped hydrocarbons.