In 1790, the Sanqing troupe of Yangzhou came to Beijing to perform for the Qianlong emperor’s 80th birthday. It sang mainly in the erhuang style of the Anhui troupes. Other Anhui troupes followed. Together with Sanqing, the Sixi, Chuntai and Hechun troupes became known as the Four Great Anhui Troupes. (Video in Chinese, with English subtitles.)
Many actors of Qinqiang and Kunqu opera moved into the Anhui troupes. In the Daoguang era, actors from Hubei brought the xipi tune to Beijing. There xipi and erhuang merged, took on the sound of Beijing speech and gradually became Peking opera.