Solid molecular oxygen is a rare example of pure direct-exchange interaction between localized electronic spins S = 1. Antiferromagnetic correlations between nearest O2 neighbors exist already in the liquid phase. When solidified, O2 undergoes two magneto-structural phase transitions. The low-temperature phase is long-range ordered with collinear antiferromagnetic alignment of the O2 spins. We performed DC susceptibility measurements of O2 confined into the nanometer-sized pores of silica substrates. At the smallest pore diameters, all solid-solid phase transitions are suppressed. By quantitative investigation of different degrees of filling, we obtain convincing evidence that the major part of the spins is entangled into a collective singlet ground state.