In the iron-pnictide material CeFeAsO not only the Fe moments, but also the local 4f moments of the Ce order antiferromagnetically at low temperatures. We elucidate on the peculiar role of the Ce on the emergence of superconductivity. While application of pressure suppresses the iron SDW ordering temperature monotonously up to 4 GPa, the Ce-4f magnetism is stabilized, until both types of magnetic orders disappear abruptly and a narrow SC dome develops. With further increasing pressure characteristics of a Kondo-lattice system become more and more apparent in the electrical resistivity. This suggests a connection of the emergence of superconductivity with the extinction of the magnetic order and the onset of Kondo-screening of the Ce-4f moments.