The present invention relates to novel acylaminocycloalkyl compounds, in particular to the compounds of the formula I as described herein and to their salts and N-oxides. The compounds possess valuable therapeutic properties and are suitable, in particular, for treating diseases that respond to modulation of the dopamine D3 receptor.