The participants laid flowers and lit incense Friday at the stature of King Ly Thai To, the founder of capital Hanoi in the 10th century amid a heavy police presence. The authorities used loudspeakers to urge the crowd to disperse.
There are no official government activities marking the event, but it was extensively covered in the state media this week.
China sent hundreds of thousands of troops into northern Vietnam 38 years ago, for what it said was to teach Vietnam a lesson for invading China-backed Khmer Rouge regime in Cambodia.