The invention relates to a process for the production of a gasoline with a low sulfur content starting from an initial gasoline that comprises olefins, thiophene compounds and mercaptans and comprises a stage for treating at least one fraction of the initial gasoline under conditions of alkylation of the thiophene compounds by the olefins, a stage for treating at least one fraction of the effluent that is obtained from the preceding stage under conditions of addition of the olefins to the mercaptans, and a distillation stage for obtaining a light fraction that is low in thiophene compounds and mercaptans, and a heavy fraction that is high in sulfur.