The pipa is a pear-shaped, fretted lute. It migrated from Central Asia into China during the Han and Sui dynasties; its name comes from the two directions of the plectrum stroke, p'i (forward) and p'a (backward). Until the mid-tenth century it was held horizontally and its twisted silk strings were plucked with a large triangular plectrum. Toward the end of the Tang dynasty musicians began using their fingernails, and the instrument came to be held more upright.