Legendary Vietnamese general Vo Nguyen Giap, whose guerrilla tactics defeated the French and American armies, has died aged 102.

The founding father of the Vietnam People's Army, Giap was regarded as one of Vietnam's most revered figures - second only to late revolutionary leader Ho Chi Minh.

Giap masterminded the Tet Offensive against US troops in 1968, which is often cited as major factor that led to the Americans' withdrawal from the Vietnam War.

"I can confirm that general Giap died at 6:08pm [on Friday]," a government source told AFP on condition of anonymity.

He died surrounded by family at Hanoi's 108 military hospital, where he had been living for the last three years.

"He's a mythic, heroic figure for Vietnam," said Carl Thayer, an Australian-based scholar of the country.

News of the death sparked an outpouring of tributes, both in Vietnam and abroad.

Vietnamese internet users immediately began paying tribute to the general, who remained hugely popular despite being relegated to the political sidelines after the war.

"Rest In Peace the hero of the people. You will always be our greatest general," one wrote, in a posting typical of the outpouring of grief which erupted online as news of his death emerged.

Another Facebook commentator called for a day of national mourning.

"[Giap] contributed lots to our Vietnamese nation," wrote user Thanh Trang Le.

Former US Republican presidential candidate John McCain, a former navy pilot who was shot down and famously held as a prisoner of war in Vietnam, took to Twitter to pay his respects.

Gen. Vo Nguyen Giap has passed away - brilliant military strategist who once told me that we were an "honorable enemy" #Vietnam — John McCain (@SenJohnMcCain) October 4, 2013

From humble beginnings to victories over French, Americans

Giap, born on August 25, 1911 into a well-off peasant family, was a self-taught soldier whose only military lesson came from an old encyclopaedia entry describing the mechanism of hand grenades.

He went on to secure victory over the French in 1954 at Dien Bien Phu, the battle that ended Paris' rule in Indochina and precipitated nearly two decades of US involvement in Vietnam.

"General Vo Nguyen Giap is one of the most talented military strategists and most famous generals, not just in Vietnam, but in world military history," Vietnamese historian Phan Huy Le told AFP.

His greatest triumph will always be the Dien Bien Phu victory, based on an astounding logistical feat by his Viet Minh fighters, who surprised the French by hauling their artillery into surrounding jungle hills from where they pounded enemy positions below.

"It was the spark that lit the powder keg for the empire. Less than six months after Dien Bien Phu, the Algerian war [for independence] began with the All Saints Day attacks," French historian Hugues Tertrais said.

"Dien Bien Phu was effectively where it all started."

For two decades after Dien Bien Phu, Giap, a former history teacher who was fluent in French, continued to command his forces as they battled American troops and their surrogate regime in South Vietnam until final victory on April 30, 1975.

The fall of Saigon fuelled his near mythical status overseas as a master strategist and inspired liberation movements everywhere.

But Giap's success on the battlefield had earned him some powerful enemies at home - including party chief Le Duan - and after the war, in 1980, Giap lost his post as defence minister.

He was eased out of the Politburo in 1982 and left politics officially in 1991.

Yet he continued to speak out until well into his 90s about sensitive issues such as corruption and bauxite mining, and his popularity, particularly among the young, remained undiminished.

He is survived by Dang Bich Ha, his wife since 1949, and four children.

AFP