Early in the "Kaiyuan" era (713-741) of Wu Zetian's grandson Emperor Xuanzong, Zhang Jiazhen, who was then still serving as the secretary general at Bing Prefecture, was in then-capital Chang'an on one occasion to report on his prefecture. Emperor Xuanzong had heard of his capabilities and therefore praised him. Zhang Jiazhen took the opportunity to request that his brother Zhang Jiayou, who was then the secretary general at Shan Prefecture (鄯州, roughly modern Haidong Prefecture, Qinghai), be moved to a closer location to him, as he missed his brother. Emperor Xuanzong praised him for his brotherly love and made Zhang Jiayou the prefect of Xin Prefecture (忻州, roughly modern Xinzhou, Shanxi), close to Zhang Jiazhen's post at Bing Prefecture.