A three-level atomic medium can be made transparent to a resonant probe field in the presence of a strong control field acting on an adjacent atomic transition to a long-lived state, which can be represented by a highly excited Rydberg state. The long-range interactions between the Rydberg state atoms then translate into strong, non-local, dispersive or absorptive interactions between the probe photons, which can be used to achieve deterministic quantum logic gates and single photon sources. Here we show that long-range dipole–dipole exchange interaction with one or more spins—two-level systems represented by atoms in suitable Rydberg states—can play the role of control field for the optically dense medium of atoms. This induces transparency of the medium for a number of probe photons n p not exceeding the number of spins n s , while all the excess photons are resonantly absorbed upon propagation. In the most practical case of a single spin atom prepared in the Rydberg state, the medium is thus transparent only to a single input probe photon. For larger number of spins n s , all n p ≤ n s photon components of the probe field would experience transparency but with an n p -dependent group velocity.