Tibet was once a strong power contemporaneous with Tang China (618–907). Until the Tibetan Empire's collapse in the 9th century, it was the Tang's major rival in dominating Inner Asia. The Yarlung rulers of Tibet also signed various peace treaties with the Tang, culminating in a treaty in 821 that fixed the borders between Tibet and China.
In what century did the Tibetan Empire fall? Who signed multiple peace treaties with the Tang?  What did one of the treaties between the Tang and Tibet help fix? Who was the Tangs biggest rival? What year did Tang and Tibet sign a treaty to fix the borders?