Diazabicycloalkanes and oxazabicycloalkanes containing medium and large rings can be prepared by rhodium-catalysed reactions of N-alkenylpropane-1,3-diamines and 2-(alkenylamino)ethanols with H2/CO in excellent yields without the need for high dilution. Selective ring opening of these compounds can lead to large heterocycles.