General Vo Nguyen Giap, who drove the French and US out Vietnam in successive wars, has died aged 102.

Mr Giap had become frail in recent years, halting his custom of attending the opening sessions of the country’s National Assembly.

He resided at Central Military Hospital 108 in Hanoi as of February 2013, the army newspaper Quan Doi Nhan Dan reported.

Mr Giap’s transformation from imperialist-bashing revolutionary to honoured elder statesman mirrored Vietnam’s move from international outcast to its self-described “friend to all nations” policy.

“The aggressor army of the US imperialists, although over-supplied with arms and ammunition, cannot escape the doom that has befallen the other invaders on this soil,” Mr Giap wrote in 1972.

By 1995, Vietnam had opened diplomatic relations with the US, a top market for Vietnamese exports.

“After Ho Chi Minh, he was the most important figure in the 20th century Vietnamese experience,” Stanley Karnow, a Pulitzer-Prize winning author who covered the Vietnam War, said in a 2008 telephone interview.

“He was a self-taught general, and the key to his generalship was a strategy of sheer endurance.”

Mr Giap was born on 25 August, 1911, in the central province of Quang Binh, a sparsely populated province with poor-quality land pressed up against the Laotian border.

Quang Binh is just to the north of the Ben Hai River, the de facto border between North Vietnam and South Vietnam until reunification in 1975.

The eldest surviving son in his family, Mr Giap received a strong dosage of patriotic ideals from his father, a scholarly rice farmer who taught local children to read in his spare time.

At age 13, he went to study in the central city of Hue, seat of the imperial court, which by then had become a virtual puppet under the control of the French colonial administration.

Protests against French prohibitions on nationalist activities resulted in Mr Giap’s expulsion from school, his introduction to Marxist studies, and ultimately to an arrest at the age 18 for taking part in political activities.

Once freed, he went to Hanoi for the first time and earned a law degree from a French-run university.

Mr Giap’s joining of the Communist Party of Vietnam resulted in both a marriage to a fellow militant, who later died in prison after being arrested by the French, as well as eventually a move to China where he first met Ho Chi Minh, who was directing anti-French activities.

He assumed responsibility for forming guerrilla units after returning to Vietnam and although lacking formal military training, took control of the military activities of the Doc Lap Dong Minh Viet Nam, known to the Western world as the Viet Minh.

People's war

Ho Chi Minh declared Vietnam independent in September 1945, which led after a breakdown of negotiations with France to full- scale warfare by the end of 1946.

Mr Giap, by then named a general, began following a strategy known as the “people’s war:” an all-out societal mobilisation that included a willingness to sacrifice troops to make it clear to the enemy that they were involved in a drawn-out war of attrition.

“You could say that the strategy was brutal, but to him this was akin to a holy cause,” said Mr Karnow, who had interviewed Mr Giap, and who died in January 2013.

“There was no limit to what he was prepared to accept in terms of losses.”

The French war ended after a Viet Minh victory at Dien Bien Phu, in which Mr Giap had troops haul supplies by hand including howitzers through mountainous and jungle-laden terrain to surround a French outpost, set up to protect neighboring Laos.

A two-month siege following Viet Minh attack in March 1954 resulted in the one-by-one taking of French positions, a humiliating French surrender in May, and a peace agreement that led to the dividing of Vietnam into north and south.

“Much of the credit for Dien Bien Phu should go to Giap and the way he adapted to the situation,” said William Duiker, a retired professor of East Asian Studies at Pennsylvania State University and the author of several books on Vietnam. “His strategy was to find a place where the defeat of the French would maximise its propaganda effectiveness.”

Within a decade Vietnam found itself pitted against another Western power, as US involvement increased in what is known locally as the American War.

While Mr Giap remained the formal military commander-in-chief position and at the time was seen in the West as the key military decision maker, his influence declined during the 1960s, according to Mr Duiker.

Though he served as defence minister and a deputy prime minister in post-reunification Vietnam, he was removed from government positions by the early 1980s.

By the 1990s, when Vietnam began fully opening its society and economy to Western influences, he had become entrenched as a living local legend.

In 2009, his name resurfaced in the news after he wrote an open letter to Prime Minister Nguyen Tan Dung to call for a temporary halt to a planned bauxite project in order to study the potential environmental impact.

Mr Giap was visited in February 2013 in the Hanoi military hospital by Defence Minister Phung Quang Thanh ahead of Vietnam’s Tet lunar new year holiday, the Quan Doi Nhan Dan newspaper reported.

“His major legacy was the role he played in the war against France and his association with the idea of people’s war, which is symbolic of the way in which a weaker force can oppose a stronger, more technologically advanced force, using political as well as military means,” Mr Duiker said.