detailed several embryonic features of xia culture from his period. These popular phenomena were also documented in other historical records such as the Book of Han and the Book of the Later Han. Xiake stories made a turning point in the Tang dynasty (618–907) and returned in the form of chuanqi (傳奇; literally "legendary tales"). Stories from that era, such as Nie Yinniang (聶隱娘), The Kunlun Slave, Thirteenth Madame Jing (荊十三娘), Red String (紅線) and The Bearded Warrior (虬髯客), served as prototypes for modern wuxia stories. They featured fantasies and isolated protagonists – usually loners – who performed daring heroic deeds. During the Song dynasty (960–1279), similar stories circulated in the huaben, short works that were once thought to have served as prompt-books for shuochang (traditional Chinese storytelling). The genre of the martial or military romance also developed during the Tang dynasty. In the Ming dynasty (1368-1644), Luo Guanzhong and Shi Nai'an wrote Romance of the Three Kingdoms and Water Margin respectively, which are among the Great Classical Novels of Chinese literature. The former is a romanticised historical retelling of the events in the late Eastern Han dynasty and the Three Kingdoms period, while the latter criticises the deplorable socio-economic status of the late Northern Song dynasty. Water Margin is often seen as the first full-length wuxia novel: the portrayal of the 108 heroes, and their code of honour and willingness to become outlaws rather than serve a corrupt government, played an influential role in the development of jianghu culture in later centuries. Romance of the Three Kingdoms is also seen as a possible early antecedent and contains classic close-combat descriptions that were later emulated by wuxia writers in their works In the Qing dynasty (1644-1911), further developments were the gong'an (公案; literally "public case") and related detective novels, where xia and other heroes, in collaboration with a judge or magistrate, solved crimes and battled injustice. The Justice Bao stories from Sanxia Wuyi (三俠五義; later extended and renamed to Qixia Wuyi) and Xiaowuyi (小五義), incorporated much of social justice themes of later wuxia stories. Xiayi stories of chivalrous romance, which frequently featured female heroes and supernatural fighting abilities, also surfaced during the Qing dynasty. Novels such as Shi Gong'an Qiwen (施公案奇聞) and Ernü Yingxiong Zhuan (兒女英雄傳) have been cited as the clearest nascent wuxia novels. The term "wuxia" as a genre label itself first appeared at the end of the