In 640 he married Princess Wencheng, the niece of the powerful Chinese emperor Taizong of Tang China