A process for the treatment of a gasoline containing sulfur-containing compounds and olefins, the process comprising at least the following steps: a) bringing the gasoline, hydrogen and a hydrodesulfurization catalyst into contact in at least one reactor at a temperature in the range 200°C to 400°C, at a pressure in the range 0.5 to 5 MPa, at a space velocity in the range 0.5 to 20 h -1 and with a ratio between the flow rate of hydrogen, expressed in normal m 3 per hour, and the flow rate of the feed to be treated, expressed in m 3 per hour under standard conditions, in the range 50 Nm 3 /m 3 to 1000 Nm 3 /m 3 , in order to convert at least a portion of the sulfur-containing compounds into H 2 S; b) carrying out a step for separating the H 2 S which is formed and present in the effluent obtained from step a); c) bringing all or part of the H 2 S-depleted effluent obtained from step b) into contact, in a reactor, with a catalyst containing at least one sulfide of at least one transition metal selected from metal from group VIb, a metal from group VIII and copper alone or as a mixture, or lead deposited on a porous support capable of transforming the sulfur-containing compounds from the mercaptans family into sulfur-containing compounds of tioether type by reaction with the olefins of the gasoline, step c) being carried out at a temperature in the range 30°C to 250°C, with a liquid space velocity in the range 0.5 h -1 to 10 h -1 , a pressure in the range 0.2 to 5 MPa and an H 2 /feed ratio in the range 0 to 10 Nm 3 of hydrogen per m 3 of feed, in order to produce a gasoline obtained from step c) with a reduced mercaptans content compared with that of the effluent obtained from step b). a) bringing the gasoline, hydrogen and a hydrodesulfurization catalyst into contact in at least one reactor at a temperature in the range 200°C to 400°C, at a pressure in the range 0.5 to 5 MPa, at a space velocity in the range 0.5 to 20 h -1 and with a ratio between the flow rate of hydrogen, expressed in normal m 3 per hour, and the flow rate of the feed to be treated, expressed in m 3 per hour under standard conditions, in the range 50 Nm 3 /m 3 to 1000 Nm 3 /m 3 , in order to convert at least a portion of the sulfur-containing compounds into H 2 S; b) carrying out a step for separating the H 2 S which is formed and present in the effluent obtained from step a); c) bringing all or part of the H 2 S-depleted effluent obtained from step b) into contact, in a reactor, with a catalyst containing at least one sulfide of at least one transition metal selected from metal from group VIb, a metal from group VIII and copper alone or as a mixture, or lead deposited on a porous support capable of transforming the sulfur-containing compounds from the mercaptans family into sulfur-containing compounds of tioether type by reaction with the olefins of the gasoline, step c) being carried out at a temperature in the range 30°C to 250°C, with a liquid space velocity in the range 0.5 h -1 to 10 h -1 , a pressure in the range 0.2 to 5 MPa and an H 2 /feed ratio in the range 0 to 10 Nm 3 of hydrogen per m 3 of feed, in order to produce a gasoline obtained from step c) with a reduced mercaptans content compared with that of the effluent obtained from step b). <EOS>