  Massive stellar clusters are the best available laboratories to study the
mass function of stars. Based on NTT/SofI near-infrared photometry, we have
investigated the properties of the massive young cluster Westerlund 1. From
comparison with stellar models, we derived an extinction A_{Ks} = 0.91 +/- 0.05
mag, an age \tau = 4 +/- 0.5 Myr and a distance d = 4.0 +/- 0.2 kpc for
Westerlund 1, as well as a total mass of M_{Wd1} = 4.91_{-0.49}^{+1.79} x 10^4
M_{sun}. Using spatially dependent completeness corrections we performed a 2D
study of the cluster's IMF and, in addition, of the stellar density profiles of
the cluster as a function of mass. From both IMF slope variations and stellar
density, we find strong evidence of mass segregation. For a cluster with some
10^5 stars, this is not expected at such a young age as the result of two-body
relaxation alone. We also confirm previous findings on the elongation of
Westerlund 1; assuming an elliptical density profile, we found an axis ratio of
a:b = 3:2. Rapid mass segregation and elongation could be well explained as the
results of subclusters merging during the formation of Westerlund 1.
