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 \dot { P } < 2 \times 10 ^ { -10 } s s ^ { -1 } , which implies that the spin-down luminosity is \dot { E } \leq 3 \times 10 ^ { 33 } erg s ^ { -1 } . The X-ray luminosity of the pulsar is L _ { X } \approx 3 ^ { +10 } _ { -2 } \times 10 ^ { 33 } ( D / 5 ~ { } { kpc } ) ^ { 2 } erg s ^ { -1 } , and the spectrum can be described by a kT = 0.61 ^ { +0.02 } _ { -0.02 } keV blackbody with a radius of R _ { bb } = 0.27 \pm 0.03 ( D / { 5 ~ { } { kpc } } ) km . Deep infrared observations reveal no counterpart with K < 18.5 , ruling out a binary companion with M > 1 M _ { \odot } . 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 } \approx 35 M _ { \odot } and > 50 post-main-sequence stars that indicate the cluster is 4 \pm 1 Myr old . Therefore , the progenitor to this pulsar had an initial mass M _ { i } > 40 M _ { \odot } . This is the most secure result among a handful of observational limits to the masses of the progenitors to neutron stars .