We demonstrate that an antiferromagnetic coupling between paramagnetic Fe-porphyrin molecules and ultrathin Co and Ni magnetic films on Cu(100) substrates can be established by an intermediate layer of atomic oxygen. The coupling energies have been determined from the temperature dependence of x-ray magnetic circular dichroism measurements. By density functional theory+U calculations the coupling mechanism is shown to be superexchange between the Fe center of the molecules and Co surface-atoms, mediated by oxygen.