Gas-phase reactions of atomic sulfur in its first electronically excited metastable state, S( 1 D), with water and methanol have been theoretically investigated to characterize their potential energy surfaces, the reaction mechanisms, and the product branching fractions. According to our results, both reactions proceed with the formation of bound intermediates that, for the isolated systems, decompose into products because of the large energy content with which they are formed. The SO(a 1 Δ) + H 2 channel is the only open one for the S( 1 D) + H 2 O reaction, while many channels are open for the S( 1 D) + CH 3 OH reaction. For the latter case, statistical estimates of the product branching fractions indicate that the main channels are those leading to CH 2 OH + SH, H 2 CO + H 2 S, H 2 CS + H 2 O, and CH 3 + HSO. The mechanism of the related O( 1 D) + CH 3 SH reaction has also been unveiled. Since the reaction intermediates can be stabilized by energy loss to surrounding species on ice or in liquid water, to gain some insights into the possible effects of water molecules, we have also analyzed how the two reactions behave when four additional water molecules are added. The conclusion is that the initial intermediates formed by the insertion or addition mechanism, namely, HOSH (hydrogen thioperoxide) and H 2 OS for S( 1 D) + H 2 O and CH 2 OHSH (mercaptomethanol), CH 4 OS and CH 3 OSH (methyl thioperoxide) for S( 1 D) + CH 3 OH, as well as CH 3 SOH (methyl sulfenic acid) for O( 1 D) + CH 3 SH, will probably be stabilized by the interaction with the additional water molecules. Our results can help in understanding sulfur chemistry in space, especially in the case of comets. On the one hand, the S( 1 D) + H 2 O gas-phase reaction could account for the additional SO source necessary to explain the observed distribution of this species obtained by using the Plateau de Bure interferometer of Institut de Radioastronomie Millimetrique (IRAM) for the Hale Bopp comet. On the other hand, some of the S/O-containing molecules identified by ROSINA (Rosetta Orbiter Spectrometer for Ion and Neutral Analysis) during the enhanced dust emission events of the 67/P comet (e.g., species with the gross formula HSO, H 2 SO, and CH 4 OS) could be the results of the chemistry occurring on ice that we have exposed in this work.