Tong Guan (1054–1126), courtesy name Daofu (), was a Chinese court eunuch, military general, political adviser, and state councillor to Emperor Huizong of the Song dynasty. In the classical novel Water Margin, Tong Guan is fictionalised as a corrupt government official and an enemy of the 108 Stars of Destiny. Life and career Tong Guan began his military career under the mentorship of a leading eunuch general of the 1080s and became one of the few eunuch generals of the Song dynasty. Despite being a eunuch, it was written by many that Tong Guan had strong personal character and was in peak physical condition, with a long beard that was considered unusual for eunuchs. After Tong Guan gained his first victory in battle in 1104, Emperor Huizong granted him a valuable document of his own calligraphy written in his unique "slender gold" style. After Tong Guan gained a greater reputation by commanding a series of victorious battles in the northwest against the Tanguts, he became the favourite general and advisor of Emperor Huizong. In 1111, he went on a diplomatic mission to the Khitan-led Liao dynasty to the northeast, and after this his career steadily advanced. The following year, he was promoted to the top of the military command structure and by 1116 he was the first eunuch in the Song dynasty to gain entry into the top echelons of central administration as one of the chief policy-makers. Tong Guan was involved in all of the elite social gatherings of the time, as his name appeared as a guest on numerous lists for organised parties and banquets hosted by Emperor Huizong. He was also one of only ten palace eunuchs who had their biographies as painters compiled and written for the court. In the year 1118, Tong Guan suggested to Emperor Huizong that a military alliance with the Jurchens would be favourable in crushing the Liao dynasty once and for all. Emperor Huizong agreed, despite some protest by other ministers at court. In a secret alliance and mission of envoys across the borders, Tong Guan played a leading role in the agreement that was reached between the Jurchens and the Song dynasty to divide the Liao dynasty's territory (while the Song would ultimately obtain their coveted prize: the Sixteen Prefectures). In 1120, at the age of 66, Tong Guan was put in command of an army to begin the assault