The present invention provides spiro-[1,3]-oxazines and spiro-[1,4]-oxazepines of formula I having BACE1 and/or BACE2 inhibitory activity, their manufacture, pharmaceutical compositions containing them and their use as therapeutically active substances. The active compounds of the present invention are useful in the therapeutic and/or prophylactic treatment of e.g. Alzheimer's disease and type 2 diabetes.