A method of producing a fuel composition from a bio-oil feedstock is provided, wherein the bio-oil feedstock is subjected to a step of oil extraction to produce a bio-oil and deoiled residue. At least a portion of the deoiled residue is gasified to produce a hydrogen-containing gas. The bio-oil is subjected to an upgrading process to ultimately produce a fuel composition. At least a part of the hydrogen-containing gas produced in the gasification of deoiled residue is used in the upgrading process of producing a fuel composition. The upgrading process, which can involve hydro-treating, hydroisomerization and at least one separation step, produces light hydrocarbons in addition to the product fuel composition. The light hydrocarbons can be used in the gasification operation, e.g., to reduce tar formation.