The region was torn by constant warfare and economic distress as it was besieged by the Tibetan Empire.