An integrated process for production and upgrading of heavy and extra-
heavy crude oil, comprising (a) reforming of hydrocarbons such as
natural gas to produce
hydrogen, CO2 and steam (b) separating the produced
hydrogen from the CO2, steam and any other gases to give a
hydrogen rich fraction and a CO2 rich fraction and steam, (c) injecting the steam alone or in combination with the CO2 rich fraction into a reservoir containing heavy or extra heavy oil to increase the oil
recovery, and (d) upgrading / refining of the heavy or extra heavy oil to finished products by extensive hydroprocessing, comprising several steps of hydrocracking and hydrotreating (
sulfur,
nitrogen and metals removal as well as hydrogenation of olefins and aromatics), using the hydrogen rich fraction.