The Tay Son Rebellion, starting from a rural guerrilla base in 1771, slowly grew to national stature. It featured Nguyen Hue, one of Vietnam's greatest military heroes, who overthrew the Trinh shogunate in 1786, and drove out Chinese invaders in 1789. The Tay Son regime foundered in 1802.