Compounds of formula I ##STR1## wherein rings A and B are as defined in the specification, have valuable pharmacological properties and are particularly effective as NK1 antagonists and substance P antagonists. Said compounds are prepared in a manner known per se.