The invention relates to a method of detecting urine and/or feces comprising: -detecting the concentration of at least one gas component indicative of urine and the concentration of at least one gas component indicative of feces. The method comprises: registering, for each gas component, a characteristic (10, 11) corresponding to the variation over time of the concentration of each gas component; comparing said registered characteristic (10, 11) with a predetermined characteristic (12, 13) for the corresponding gas component; indicating a presence of urine if the registered characteristic of at least one gas component indicative of urine generally conforms with the predetermined characteristic of the same gas component; and indicating a presence of feces if the registered characteristic (10, 11) of at least one gas component indicative of feces generally conforms to the predetermined characteristic (12, 13) of the same gas component. The invention also relates to a system for detecting urine and/or feces.