The Taj was built by Shah Jahan as a memorial for his third wife, Mumtaz Mahal, who died giving birth to their 14th child in 1631. The death of Mumtaz left the emperor so heartbroken that his hair is said to have turned grey virtually overnight. Construction of the Taj began the following year; although the main building is thought to have been built in eight years, the whole complex was not completed until 1653.