Context : Aims : The properties of the early-type stars in the core of the Westerlund 2 cluster are examined in order to establish a link between the cluster and the very massive Wolf-Rayet binary WR 20a as well as the H ii complex RCW 49 . Methods : Photometric monitoring as well as spectroscopic observations of Westerlund 2 are used to search for light variability and to establish the spectral types of the early-type stars in the cluster core . Results : The first light curves of the eclipsing binary WR 20a in B and V filters are analysed and a distance of 8 kpc is inferred . Three additional eclipsing binaries , which are probable late O or early B-type cluster members , are discovered , but none of the known early O-type stars in the cluster displays significant photometric variability above 1 % at the 1- \sigma level . The twelve brightest O-type stars are found to have spectral types between O3 and O6.5 , significantly earlier than previously thought . Conclusions : The distance of the early-type stars in Westerlund 2 is established to be in excellent agreement with the distance of WR 20a , indicating that WR 20a actually belongs to the cluster . Our best estimate of the cluster distance thus amounts to 8.0 \pm 1.4 kpc . Despite the earlier spectral types , the currently known population of early-type stars in Westerlund 2 does not provide enough ionizing photons to account for the radio emission of the RCW 49 complex . This suggests that there might still exist a number of embedded early O-stars in RCW 49 .