Chagatai Khan (Mongolian script: ; Čaɣatay; ; , Čaġatāy; , Chaghatay-Xan; , Chágětái; , Joghatây; 22 December 1183 – 1 July 1242) was the second son of Genghis Khan and Börte. He inherited most of what are now five Central Asian states after the death of his father. He was also appointed by Genghis Khan to oversee the execution of the Yassa, the written code of law created by Genghis Khan. Under Genghis Khan Very little is known about Chagatai's earlier life. He was the second son of Genghis Khan and Börte. Chagatai was considered hot-headed and somewhat temperamental by his relatives, because of his attitude of non-acceptance of Jochi as a full-brother. He was the most vocal about this issue among his relations. He was assigned 4 mingghans (led by Qarachar of Barlas, Kököchü of Baarin, Müge of Jalairs and Idiqudai Noyan) and an appanage around Altai Mountains in 1206 by his father. He joined the invasion of Jin Empire in 1211 with Jochi and Ögedei, capturing several cities and invading Shaanxi and Henan in 1213, also plundering Yanggu. Later Chagatai appeared at campaign against Khwarazmian Empire with his father and brothers, capturing Otrar in 1218, Samarkand in 1220, Urgench in March-April 1221. The Urgench campaign was noticeably harder because Chagatai and Jochi failed to co-operate. After this incident Ögedei was appointed commander of the besieging forces and Chagatai was given task of maintaining communication between Mongol forces with building bridges and restoring roads. He returned to his father's side during his siege of Talaqan. Chagatai was greatly affected when his son Mutukan was killed during the siege of Bamiyan in 1221. He was present at the battle where Jalal ad-Din Mingburnu was defeated near the Indus River. He later commanded the rear guard during conquest of Western Xia. During reign of Ögedei and Töregene Chagatai succeeded Genghis Khan in his domains in what came to be known as Chagatai Khanate in 1227 with its capital in Almaliq city, in the valley of the Upper Ili, near the site of the present Kulja, and consequently in the extreme east of his dominion. According to Edward Ross, "his reason for fixing it in that remote position, instead of at Bukhara or Samarkand, was probably one of necessity. His Mongol tribesmen and followers—the mainstay of his power—were passionately fond of the life of the steppes." As the eldest surviving son and