Gurak or Ghurak was a medieval Sogdian ruler in Central Asia during the period of the Muslim conquest of Transoxiana. In 710, he was installed as king (Sogdian: ikhshid) of Samarkand after the populace overthrew his predecessor, Tarkhun, due to his pro-Muslim stance. The Umayyad governor, Qutayba ibn Muslim, campaigned against Samarkand but in the end confirmed Gurak as its ruler. Gurak was a cautious and intelligent ruler, and managed, through shifting alliance between the Muslims and the Turgesh, to remain on his throne. Some time after the Muslim defeat at the Battle of the Defile in 731, he managed to recover his capital, Samarkand, and achieve a quasi-independence which he maintained until his death in 737 or 738. His realm was then divided among his relatives (known from Chinese sources): Tu-ho, formerly prince of Kabudhan, received Samarkand, Me-chu'o was king of Mayamurgh, while a certain Ko-lopu-lo who was king of Ishtikhan in 742 may perhaps be identified with Gurak's brother Afarun.