We use c-axis resistivity and magnetoresistance measurements to study the interplay between antiferromagnetic (AF) and superconducting (SC) ordering in underdoped RBa_2Cu_3O_{6+x} (R = Lu, Y) single crystals. Both orders are found to emerge from an anisotropic 3D metallic state, upon which antiferromagnetism opposes superconductivity by driving the doped holes towards localization. Despite the competition, the superconductivity sets in before the AF order is completely destroyed and coexists with latter in a certain range of hole doping. We find also that strong magnetic fields affect the AF-SC interplay by both suppressing the superconductivity and stabilizing the Neel order.