  Magnetic moments strongly coupled to the spins of conduction electrons in a
nanostructure can confine the conduction-electron motion due to scattering at
almost localized Kondo singlets. We study the resulting local-moment formation
in the conduction-electron system and the magnetic exchange coupling mediated
by the Kondo singlets. Its distance dependence is oscillatory and induces
robust ferro- or antiferromagnetic order in multi-impurity systems.
