From the 1st to the 6th centuries, the south of what is now Vietnam was part of the Indianised kingdom of Funan. The Hindu kingdom of Champa appeared around present-day Danang in the late 2nd century and had spread south to what is now Nha Trang by the 8th century. The Chinese conquered the Red River Delta in the 2nd century and their 1000-year rule, marked by tenacious Vietnamese resistance and repeated rebellions, ended in 938 AD when Ngo Quyen vanquished the Chinese armies at the Bach Dang River.
During the next few centuries, Vietnam repulsed repeated invasions by China, and expanded its borders southwards from the Red River Delta, populating much of the Mekong Delta. In 1858, French and Spanish-led forces stormed Danang after several missionaries had been killed. A year later, Ho Chi Minh City (formerly Saigon) was seized. By 1867, France had conquered all of southern Vietnam, which became the French colony of Cochin-China.
Communist guerillas under the leadership of Ho Chi Minh resisted French domination. Ho Chi Minh's declaration of Vietnamese independence after WWII sparked violent confrontations with the French, culminating in the French military defeat at Dien Bien Phu in 1954.
The Geneva Accords of 1954 temporarily divided Vietnam into two zones (the Communist north and the anti-Communist, US-supported south). Political and ideological opposition quickly turned to armed struggle, prompting the USA and other countries to commit combat troops in 1965. The Paris Peace Agreements, signed in 1973, provided an immediate cease-fire and signalled the withdrawal of US troops. Saigon eventually capitulated to the Communist forces on 30 April 1975.
Going straight from the fat into the frying pan, Vietnam had barely drawn breath from its war with America when it found itself at loggerheads with Khmer Rouge forces along the Cambodian borders. A protracted round of fighting eventually saw China enter the fray in support of Cambodia and the killings continued until the UN brokered a deal, with Vietnamese forces being pulled out of Cambodia in 1989. Although the Khmer Rouge continued to snipe from the borders, it was the first time since WWII that Vietnam was not officially at war with any other nation. The end of the Cold War and the collapse of the USSR in 1991 caused Vietnam and Western nations to seek rapprochement.
In July 1995 even intransigent America re-established diplomatic relations with Hanoi although the diplomatic handshake appeared limp-wristed and begrudging when Hanoi refused to sign trade agreements with the US in 1999. The US, on their part, talked about normalising relations but 25 years later there's still a lot of soul-searching, hand-wringing and post mortems going on, accompanied by a slather of angst-ridden films and a handful of unplugged guitar tunes.
Matters aren't helped by spokespersons such as John McCain who, on a recent visit to Hanoi, talked about 'the wrong guys winning the war'. Vietnam went through something of a postwar economic boom but in recent years the economy has slowed and the country is at a crossroads, although some commentors predict it will be the next Asian 'tiger'.