Process for the treatment of a feedstock resulting from a renewable source, the said feedstock consisting of all vegetable oils and animal fats, containing triglycerides and fatty acids or esters, with fatty hydrocarbon chains having a number of carbon atoms of between 6 and 25, the said feedstock having contents of sulfur and of nitrogen of less than 500 ppm, and contents of aromatics of less than 5% by weight, the said feedstock being subjected to a pretreatment or prerefining stage consisting of a gentle prehydrogenation of the said feedstock carried out at a temperature of between 50 and 400°C and at a hydrogen pressure of between 0.1 and 10 MPa over a catalyst comprising metals from Groups VIII and/or VIb and an alumina and/or silica support, the said process comprising the following stages: a) hydrotreating in the presence of a fixed bed catalyst, the said catalyst comprising from 1% to 5% by weight of nickel oxide (NiO) and from 5% to 25% by weight of molybdenum oxide (MoO 3), on an amorphous inorganic support, and an amorphous alumina support, the percentages being expressed as % by weight with respect to the total weight of the catalyst, the said catalyst containing an element phosphorus deposited on the support, the content by weight of oxide of the said element being at least 0.001% and less than 10%, the metals of the said catalyst being sulfur-comprising metals, at a temperature of between 220 and 320°C, at a pressure of between 1 MPa and 4 MPa, at an hourly space velocity of between 0.1 h -1 and 10 h -1 and in the presence of a total amount of hydrogen mixed with the feedstock such that the hydrogen/feedstock ratio is between 150 and 450 Sm 3 of hydrogen/m 3 of feedstock, corresponding to an amount of hydrogen added to the present feedstock of at least 0.5% by weight of hydrogen with respect to the feedstock, b) separation, from the effluent resulting from stage a), of the hydrogen, of the gases and of at least one gas oil base exhibiting a content of sulfur of less than 10 ppm by weight, the said separation stage being followed by a stage of removal of the water by drying, passing over a desiccant, flash distillation or separation by settling. a) hydrotreating in the presence of a fixed bed catalyst, the said catalyst comprising from 1% to 5% by weight of nickel oxide (NiO) and from 5% to 25% by weight of molybdenum oxide (MoO 3), on an amorphous inorganic support, and an amorphous alumina support, the percentages being expressed as % by weight with respect to the total weight of the catalyst, the said catalyst containing an element phosphorus deposited on the support, the content by weight of oxide of the said element being at least 0.001% and less than 10%, the metals of the said catalyst being sulfur-comprising metals, at a temperature of between 220 and 320°C, at a pressure of between 1 MPa and 4 MPa, at an hourly space velocity of between 0.1 h -1 and 10 h -1 and in the presence of a total amount of hydrogen mixed with the feedstock such that the hydrogen/feedstock ratio is between 150 and 450 Sm 3 of hydrogen/m 3 of feedstock, corresponding to an amount of hydrogen added to the present feedstock of at least 0.5% by weight of hydrogen with respect to the feedstock, b) separation, from the effluent resulting from stage a), of the hydrogen, of the gases and of at least one gas oil base exhibiting a content of sulfur of less than 10 ppm by weight, the said separation stage being followed by a stage of removal of the water by drying, passing over a desiccant, flash distillation or separation by settling.