Emperor Gaozu soon made Yang Gongren the commandant at Liang Prefecture (涼州, roughly modern Wuwei, Gansu), because of his familiarity with the region. Yang was able to govern effectively, and it was said that tribes east of the Pamir Mountains were all nominally submitting to Tang as a result. At times, when Eastern Tujue forces attacked, he was able to repel them, but his own territory nevertheless suffered losses from Eastern Tujue raids. In winter 619, Yang was nominally given the title of "Nayan" (納言) -- the title for the head of the examination bureau, one considered as a post for a chancellor, but it was also explicitly stated that he did not actually take on the responsibilities of "Nayan", but remained at Liang Prefecture.