After visiting Prayag he returned to Kannauj where he was given a grand farewell by king Harsha. Traveling through the Khyber Pass of the Hindu Kush, Xuanzang passed through Kashgar, Khotan, and Dunhuang on his way back to China. He arrived in the capital, Chang'an, on the seventh day of the first month of 645, 16 years after he left Chinese territory, and a great procession celebrated his return.