In a surprise attack, while the Qing army was celebrating the Lunar New Year, Nguyễn Huệ's army defeated them at the Battle of Ngọc Hồi-Đống Đa and forced them, along with Lê Chiêu Thống, to retreat. The Tay Son were supported by Chinese pirates. Anti-pirate activities were undertaken by a joint alliance between the Qing dynasty and Nguyễn lords Gia Long while Chinese pirates collaborated with the Tay Son.