Nguyễn Huệ, one of Tây Sơn leaders, crowned the Quang Trung Emperor, and defeated the invading Chinese army in 1789. After the battle, Huệ reconciled with China, however, he waited for an opportunity to take revenge on China. He provided money to Chinese pirates. Three prominent pirates, Chen Tianbao, Mo Guanfu and Zheng Qi, were ordered to hire more pirates. Since 1790, the number of Chinese pirates grew rapidly. Most of them pledged loyalty to Tây Sơn dynasty, and were fully trained. Many pirates were granted official positions. They were able to block sea routes, and harassed the coastlines of South China (Guangdong, Fujian, Zhejiang, Jiangsu) frequently. Later, they also took part in all important naval battle against Nguyễn Ánh.