Ulugh Beg (c. 1393 or 1394 in Sultaniyeh (Persia) – October 27, 1449) was a Timurid ruler as well as an astronomer and mathematician. Ulugh Beg was also notable for his work in astronomy-related mathematics, such as trigonometry and spherical geometry. He built the great observatory in Samarkand between 1424 and 1429. He was the grandson of the conqueror, Timur (Tamerlane) (1336–1405), and oldest son of Shah Rukh and his mother was the noblewoman, Goharshad. In 1411, he became the sovereign ruler of the whole Mavarannahr khanate. ####He set out to turn the city into an intellectual center for the empire. Between 1417 and 1420, he built an institut on Registan Square in Samarkand, and he invited numerous Islamic astronomers and mathematicians to study there. The building still survives. Ulugh Beg's most famous pupil in mathematics was Ghiyath al-Kashi (approximately 1370-1429). His own particular interests concentrated on astronomy, and, in 1428, he built an enormous observatory, called the “Gurkani Zij”, Lacking telescopes to work with, he increased his accuracy by increasing the length of his sextant.. He was one of Islam's greatest astronomers during the Middle Ages. In mathematics, Ulugh Beg wrote accurate trigonometric tables of sine and tangent values correct to at least eight decimal places. Ulugh's scientific expertise was not matched by his skills in governance. He lost some battles to rival kingdoms, and, in 1448, he massacred the people of Herat Within two years, he was beheaded by his own eldest son, 'Abd al-Latif, while on his way to Mecca. Eventually, his reputation was rehabilitated by his relative, Babur, founder of the Mughal Empire.