When localizing the semidirect product of two groups, the effect on the factors is made explicit. As an application in Topology, we show that the loop space of a based connected CW-complex is a P -local group, up to homotopy, if and only if π 1 X and the free homotopy groups [S k−1 , ΩX], k ≥ 2, are P -local.