A method for producing renewable base oil fulfilling the API Group III base oil specifications, having ≥ 90 wt% saturated hydrocarbons, ≤ 0.03 wt% sulfur and a viscosity index of ≥ 120, and renewable fuel components from a feedstock of biological origin, characterized in that the method comprises the steps of a) providing a feedstock comprising free fatty acids and glycerides, preferably originating from waste and residue materials, b) separating the feedstock to at least two effluent streams comprising (i) a first effluent stream comprising free fatty acids, (ii) a second effluent stream comprising glycerides, c) hydrolyzing the glycerides of the second effluent stream to provide free fatty acids and glycerol, and d) recycling the free fatty acids obtained in step c) to the separating step b), wherein the first effluent stream is a set of first effluent streams comprising (iii) a fatty acid fraction wherein the carbon chain length is C12-C16, (iv) an optional fatty acid fraction wherein the carbon chain length is at least C17, and (v) an optional fatty acid fraction wherein the carbon chain length is C11 or less, e) subjecting at least part or all of the (iii) fatty acid fraction of the first effluent stream to ketonisation reaction at a temperature in the range from 100 to 500 °C, preferably from 300 to 400 °C, and at a pressure in the range from atmospheric pressure to 10 MPa, preferably from 0.5 to 3 MPa, in the presence of a ketonisation catalyst to produce a ketone containing stream and f) subjecting at least part of the ketone containing stream of step e) to hydrodeoxygenation reaction and to hydroisomerisation reaction, simultaneously or in sequence, to yield a renewable base oil containing stream. a) providing a feedstock comprising free fatty acids and glycerides, preferably originating from waste and residue materials, b) separating the feedstock to at least two effluent streams comprising (i) a first effluent stream comprising free fatty acids, (ii) a second effluent stream comprising glycerides, (i) a first effluent stream comprising free fatty acids, (ii) a second effluent stream comprising glycerides, c) hydrolyzing the glycerides of the second effluent stream to provide free fatty acids and glycerol, and d) recycling the free fatty acids obtained in step c) to the separating step b), wherein the first effluent stream is a set of first effluent streams comprising (iii) a fatty acid fraction wherein the carbon chain length is C12-C16, (iv) an optional fatty acid fraction wherein the carbon chain length is at least C17, and (v) an optional fatty acid fraction wherein the carbon chain length is C11 or less, (iii) a fatty acid fraction wherein the carbon chain length is C12-C16, (iv) an optional fatty acid fraction wherein the carbon chain length is at least C17, and (v) an optional fatty acid fraction wherein the carbon chain length is C11 or less, e) subjecting at least part or all of the (iii) fatty acid fraction of the first effluent stream to ketonisation reaction at a temperature in the range from 100 to 500 °C, preferably from 300 to 400 °C, and at a pressure in the range from atmospheric pressure to 10 MPa, preferably from 0.5 to 3 MPa, in the presence of a ketonisation catalyst to produce a ketone containing stream and f) subjecting at least part of the ketone containing stream of step e) to hydrodeoxygenation reaction and to hydroisomerisation reaction, simultaneously or in sequence, to yield a renewable base oil containing stream.