A new process is described for preparing very pure linear alkanethiols and linear alpha,omega-alkanedithiols using a sequential alkylation of the title compound, followed by a ring closure to quantitatively give the corresponding 3-methyl[1,3]thiazolo[3,2-a]-[3,1]benzimidazol-9-ium salt and the alkanethiol derivative under mild conditions. The alkanethiol and the heteroaromatic salt are easily separated by a simple extraction process. The intermediate thiazolium quaternary salts resulting from the first reaction step can be isolated in quantitative yields, affording an odourless protected form of the thiols.