Magnetic ordering phenomena have a profound influence on the macroscopic properties of correlatedelectron materials, but their realistic prediction remains a formidable challenge. An archetypical example is the ternary nickel oxide system RNiO 3 (R = rare earth), where the period-four magnetic order with proposals of collinear and non-collinear structures and the amplitude of magnetic moments on different Ni sublattices have been subjects of debate for decades. 1-6 Here we introduce an elementary model system -NdNiO 3 slabs embedded in a non-magnetic NdGaO 3 matrix -and use polarized resonant x-ray scattering (RXS) to show that both collinear and non-collinear magnetic structures can be realized, depending on the slab thickness. The crossover between both spin structures is correctly predicted by density functional theory and can be qualitatively understood in a low-energy spin model. We further demonstrate that the amplitude ratio of magnetic moments in neighboring NiO 6 octahedra can be accurately determined by RXS in combination with a correlated double cluster model. Targeted synthesis of model systems with controlled thickness and synergistic application of polarized RXS and ab-initio theory thus provide new perspectives for research on complex magnetism, in analogy to two-dimensional materials cre- * ated by exfoliation. 7 Recent progress in the synthesis of epitaxial heterostructures and thin films has opened new opportunities for designing and manipulating correlated-electron systems. Rareearth nickel oxides RNiO 3 with pseudocubic perovskite structure are a prominent example. In bulk form, RNiO 3 with R = La show temperature driven metal-insulator (T M I ) and Néel (T N ) transitions with T M I ≥ T N (ref. 8). While the metal-insulator transition is understood in terms of charge/bond disproportionation, [9][10][11][12][13] the nature of the antiferromagnetic ground state remains unresolved. Its unusually large periodicity is very robust and characterized by the wave vector q 0 = (1/4, 1/4, 1/4) in pseudocubic notation with proposals of collinear (↑↑↓↓) and non-collinear (↑→↓←) spin arrangements. 1,2,4,5,10,14,15 Owing to the difficulty of synthesizing large single crystals, most recent insights were gained from work on epitaxial thin films or multilayers. It has been shown that q 0 magnetic order can be induced by confinement of the electron system 6,16 and can occur with or without concomitant bond disproportionation. 17,18 Furthermore the orientation of magnetic moments in the period-four order relative to the crystallographic axes can be systematically influenced in heterostructures, e.g. by the epitaxial relation to the underlying substrate 6 or interfacial interactions. 19,20 Theoretical descriptions of the unusual magnetic order vary from localized spin models with antisymmetric exchange interactions to itinerant models 10 where the spin order arises from a nesting instability of the Fermi surface. Diverse collinear and noncollinear ground states have been discussed. 15 It is thus of great impo...