Choe Chiwon (; 857–10th century) was a Korean philosopher and poet of the late medieval Unified Silla period (668-935). He studied for many years in Tang China, passed the Tang imperial examination, and rose to the high office there before returning to Silla, where he made ultimately futile attempts to reform the governmental apparatus of a declining Silla state. In his final years, Choe turned more towards Buddhism and became a hermit scholar residing in and around Korea's Haeinsa temple. Choe Chiwon was also known by the literary names Haeun "Sea Cloud" ( ), or, more commonly, Goun "Lonely Cloud" ( ). He is recognized today as the progenitor of the Gyeongju Choe clan. Early life and study in Tang Choe Chiwon was born in the Saryang district of the Silla capital of Gyeongju in 857. He was of the so-called "head rank six" (yukdupum ) class, a hereditary class in Silla's stringent bone rank system affixed to those of mixed aristocratic and commoner birth. As a member of head rank six, Choe was restricted in the level of office he could attain. Towards the end of Silla, many in the head rank six ranks began to seek opportunities of advancement beyond the traditional confines of the Silla social-political order. One outlet was to become a Buddhist monk. Another was to take up the study of Confucianism. China's Confucian bureaucracy had been adopted to a limited degree by Silla following its unification of the peninsula in 668. Confucianism was well suited to the administration of territory and the buttressing of central authority (that is, royal absolutism). The adoption of Confucian administrative norms and Silla's closer ties with Tang China demanded a highly educated corps of scholar-officials. To meet this need the Silla monarchy turned to the frustrated talents of the head rank six class. Royal support of the head rank six also gave the monarch more leverage against an increasingly hostile aristocracy. In the early years following unification head rank six students matriculated at Silla's own National Confucian Academy, established in the late 7th century. By the 9th century, however, ambitious Silla students aspired to seek their education at the very source, in the Tang capital of Chang'an (present day Xi'an). It was in the course of the 9th century that the Choe clan of Gyeongju nurtured close ties with the Silla monarchy, and as a result many of the