The Old Book of Tang recorded the first ever embassy from Tibet arrived in China from the Tibetan emperor Songtsen Gampo in the 8th Zhenguan year or 634 CE. Tang chronicles describe this as a tribute mission, but it brought an ultimatum demanding a alliance through marriage, not subservient rituals. When Emperor Taizong of Tang refused a marriage alliance, Songtsen Gampo sent an army to attack the Chinese frontier city of Songzhou in 638, which was the first military conflict between the rising Tibetan Empire and the Chinese Tang dynasty. After a Tang army inflicted heavy casualties on the Tibetans in a night-time attack, Songtsen Gampo withdrew. He sent emissaries and tributes to Tang capital Chang'an to apologize, and to again request marriage. Taizong decided to give Songtsen Gampo a distant niece, Princess Wencheng, in marriage. The peace held for the remainder of the reigns of Taizong and Songtsen Gampo, although Tibet would pose major military threats for most of the rest of the Tang period.
There is some confusion as to whether Central Tibet conquered Zhang Zhung during the reign of Songtsen Gampo or in the reign of Trisong Detsän, (r. 755 until 797 or 804 CE). The records of the Tang Annals do, however, seem to clearly place these events in the reign of Songtsen Gampo for they say that in 634, Yangtong (Zhang Zhung) and various Qiang tribes "altogether submitted to him." Following this he united with the country of Yangtong to defeat the 'Azha or Tuyuhun, and then conquered two more tribes of Qiang before threatening Songzhou with an army of (according to the Chinese) more than 200,000 men (100,000 according to Tibetan sources). He then sent an envoy with gifts of gold and silk to the Chinese emperor to ask for a Chinese princess in marriage and, when refused, attacked Songzhou. According to the Tang Annals, he finally retreated and apologised and later the emperor granted his request.