In 627, Xuanzang reportedly had a dream that convinced him to journey to India. Tang China and the Göktürks were at war at the time and Emperor Taizong of Tang had prohibited foreign travel. Xuanzang persuaded some Buddhist guards at Yumen Pass and slipped out of the empire through Liangzhou (Gansu) and Qinghai in 629. He subsequently traveled across the Gobi Desert to Kumul (modern Hami City), thence following the Tian Shan westward.