What is the central question of this study? There is evidence that H2 S plays a role in the control of breathing: what are its actions on the ventilatory and thermoregulatory responses to hypercapnia via effects in the medullary raphe, a brainstem region that participates in the ventilatory adjustments to hypercapnia? What is the main finding and its importance? Hypercapnia increased the endogenous production of H2 S in the medullary raphe. Inhibition of endogenous H2 S attenuated the ventilatory response to hypercapnia in unanaesthetized rats, suggesting its excitatory action via the cystathionine β-synthase-H2 S pathway in the medullary raphe. Hydrogen sulfide (H2 S) has been recently recognized as a gasotransmitter alongside carbon monoxide (CO) and nitric oxide (NO). H2 S seems to modulate the ventilatory and thermoregulatory responses to hypoxia and hypercapnia. However, the action of the H2 S in the medullary raphe (MR) on the ventilatory responses to hypercapnia remains to be elucidated. The present study aimed to assess the role of H2 S in the MR (a brainstem region that contains CO2 -sensitive cells and participates in the ventilatory adjustments to hypercapnia) in the ventilatory responses to hypercapnia in adult unanaesthetized Wistar rats. To do so, aminooxyacetic acid (AOA; a cystathionine β-synthase (CBS) enzyme inhibitor), propargylglycine (PAG; a cystathionine γ-lyase enzyme inhibitor) and sodium sulfide (Na2 S; an H2 S donor) were microinjected into the MR. Respiratory frequency (fR ), tidal volume (VT ), ventilation ( ), oxygen consumption ( ) and body temperature (Tb ) were measured under normocapnic (room air) and hypercapnic (7% CO2 ) conditions. H2 S concentration within the MR was determined. Microinjection of the drugs did not affect fR , VT and during normocapnia when compared to the control group. However, the microinjection of AOA, but not PAG, attenuated fR and during hypercapnia in comparison to the vehicle group, but had no effects on Tb . In addition, we observed an increase in the endogenous production of H2 S in the MR during hypercapnia. Our findings indicate that endogenously produced H2 S in the MR plays an excitatory role in the ventilatory response to hypercapnia, acting through the CBS-H2 S pathway.