  We report the discovery of an X-ray pulsar in the young, massive Galactic
star cluster Westerlund 1. We detected a coherent signal from the brightest
X-ray source in the cluster, CXO J164710.2-455216, during two Chandra
observations on 2005 May 22 and June 18. The period of the pulsar is 10.6107(1)
s. We place an upper limit to the period derivative of Pdot<2e-10 s/s, which
implies that the spin-down luminosity is Edot<3e33 erg/s. The X-ray luminosity
of the pulsar is L_X = 3(+10,-2)e33 (D/5 kpc)^2 erg/s, and the spectrum can be
described by a kT = 0.61+/-0.02 keV blackbody with a radius of R_bb =
0.27+/-0.03 (D/5 kpc}) km. Deep infrared observations reveal no counterpart
with K<18.5, which rules out binary companions with M>1 Msun. Taken together,
the properties of the pulsar indicate that it is a magnetar. The rarity of slow
X-ray pulsars and the position of CXO J164710.2-455216 only 1.6' from the core
of Westerlund 1 indicates that it is a member of the cluster with >99.97%
confidence. Westerlund 1 contains 07V stars with initial masses M_i=35 Msun and
>50 post-main-sequence stars that indicate the cluster is 4+/-1 Myr old.
Therefore, the progenitor to this pulsar had an initial mass M_i>40 Msun. This
is the most secure result among a handful of observational limits to the masses
of the progenitors to neutron stars.
