Shi Shangxian was the youngest son of an impoverished Han (ethnic Chinese) family living in eighteenth-century Yunnan Province. As a boy, he was sold to another Han family for the purpose of marrying one of the family's daughters. Although there is no record of his married life, it apparently was not a happy one. Shi left his wife in 1748, never to return, and drifted southwestward toward the Burmese frontier to engage in commerce between the booming Munai mining region and the Tai polity of Keng Tung (now part of Burma). Shi eventually remarried, this time to an indigenous woman who belonged to one of the local Tai or upland tribes. Thus far, Shi's story is unexceptional. By the mid-eighteenth century, as many as one hundred thousand Han lived in mining communities along the Yunnan frontier (ZPZZ, 1733–2, Zhang Yunsui QL 11/5/9). Han men often married indigenous women, to the consternation of Qing officials who feared the political ramifications of intermarriage (ZPZZ, 142–1, Fuheng et al. QL 35/1/19). Shi, however, emerged from obscurity in 1765 when he and his father-in-law, a petty local leader, sided with Burma during the frontier wars of 1765–70 and attacked Qing territory. Shi, the Han ally of the Burmese, was later captured by Cao Xiu, the son of an indigenous “native official” (tusi) whose militia was patrolling the frontier at the behest of the Qing state.