the "jiu tangshu" records that gampo sent the first embassy from tibet to the tang in 634 ce. it was a "tribute mission" with tibet giving gifts to the tang. he gave gifts of gold and silk to the tang emperor and asked for a tang princess in marriage in return (heqin). tang said no. so he attacked songzhou (part of tang) in 637 and 638. but he then gave up and said sorry. he asked for a wife again, and this time the tang said yes. and so he married wencheng, niece of emperor taizong of tang. so there was peace between the tang and tibetan empires of china.