Huge crowds in Hanoi have attended funeral ceremonies for General Vo Nguyen Giap, the general who masterminded historic defeats of France and the United States.

General Giap, who had no formal military training, died aged 102. He is considered one of the greatest generals of all time, and his victories struck a fatal blow to colonialism.  

Crowds lined the streets of the Vietnamese capital cheering, crying and holding aloft pictures of their hero, known as the Red Napoleon.

A national legend, his domestic standing is second only to the leader of Vietnam's struggle against colonialism, Ho Chi Minh.

General Giap was ranked by historians among giants of military history.

He was rated with Montgomery, Rommel and MacArthur for victories over vastly better equipped armies.

His campaigns ended foreign intervention and cemented communist rule in Vietnam.

"He was the general of the people, always in the people's hearts and in history," said Nguyen Phu Trong, general secretary of the ruling Communist party.

General Giap's forces brought the party to power in 1975 after driving the US out of South Vietnam.

Hundreds of thousands of people gathered to catch a glimpse of General Giap's coffin as it was driven on a military vehicle past an unbroken line of mourners to an airport 30km away. 

His body will be flown to his home province of Quang Binh for burial.

Ruthless tactics

Though the Vietnam that General Giap helped to liberate from western control has seen unprecedented development and stability, discontent simmers over land ownership laws, entrenched corruption and an economy growing at its slowest pace in 13 years.

Television and radio played sombre music during the two-day funeral as people queued for hours to view the flag-draped coffin of the man they call the "big brother" of the nation.

General Giap's critics spoke of his ruthless tactics and willingness to sustain heavy losses in pursuit of victory, his most notable the humiliation of the French at Dien Bien Phu in 1954, which heralded the end of colonialism worldwide.

His textbooks on guerrilla warfare inspired revolutionaries and insurgents the world over.

He once said any army fighting for freedom "had the creative energy to achieve things its adversary can never expect or imagine".

In his later years, General Giap started to mellow.

His post-war political role was short-lived and he was dropped by the all-powerful politburo in 1982 before taking roles as head of committees overseeing science and family planning.

In a moving speech, his eldest son, Vo Dien Bien said the motivation of his father and the troops who served under him was to build a peaceful, unified Vietnam.

"In his death, his spirit will combine with the spirit of tens of millions of Vietnamese to become one harmonised power for a strong and wealthy Vietnam," Mr Bien said.