In 678, Tang appointed him to be the General of the Left Guard of Tang, recognizing his resourcefulness and abilities to lead troops, and had him join the conquest of Toban.
678年（儀鳳3年）には、その高い指揮能力および知略を認められて唐の都左領軍将軍となり、吐蕃討伐に参加した。