We present the results of a comparison between the environments of (1) a complete sample of 46 southern 2-Jy radio galaxies at intermediate redshifts (0.05gq) derived from deep optical imaging data. Based on these comparisons, we discuss the role of the environment in the triggering of powerful radio-loud and radio-quiet quasars. When we compare the Bgq distributions of the type-2 quasars and quiescent early-type galaxies, we find no significant difference between them. This is consistent with the radio-quiet quasar phase being a short-lived but ubiquitous stage in the formation of all massive early-type galaxies. On the other hand, powerful radio galaxies are in denser environments than the quiescent population, and this difference between distributions of Bgq is significant at the 3σ level. This result supports a physical origin of radio loudness, with high-density gas environments favouring the transformation of active galactic nucleus (AGN) power into radio luminosity, or alternatively, affecting the properties of the supermassive black holes themselves. Finally, focusing on the radio-loud sources only, we find that the clustering of weak-line radio galaxies (WLRGs) is higher than the strong-line radio galaxies (SLRGs), constituting a 3σ result. 82 per cent of the 2-Jy WLRGs are in clusters, according to our definition (Bgq ≳ 400), versus only 31 per cent of the SLRGs.