A method of detecting urine and/or feces is disclosed, which includes 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 also includes registering, for each gas component, a characteristic corresponding to the variation over time of the concentration of each gas component comparing the registered characteristic with a predetermined characteristic 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 of at least one gas component indicative of feces generally conforms to the predetermined characteristic of the same gas component. A system for detecting urine and/or feces is also disclosed.