Chairman Mao Zedong once commented that China and Vietnam were as close as lips and teeth. While the description was consonant with the geographical proximity of the two countries, it did not dwell on the question: Who is the lips and who is the teeth?

We can presume, however, that there was no ambiguity in the chairman’s mind to the effect that while the lips cannot bite the teeth, the teeth can bite the lips. Likewise, the illustration of the proximity between the two countries carried an indirect warning: In a pinch, it is China’s teeth that will bite the lips rather than the opposite.

Of all the civilizations that developed over the centuries within China’s cultural orbit, none was as conditioned as Vietnam’s by its proximity to China. While Japan and Korea, like Vietnam, shared with China an adhesion to Mahayana Buddhism with a strong Confucian and Taoist input, used ideograms to write and ate with chopsticks, none shared an extensive and often undefined land border with the Middle Kingdom.

Viewed from a historical perspective, China’s “teeth” were not a theoretical proposition. This geographical proximity and a thousand years of Chinese rule from 111 BC to AD 938 left a mark on Vietnam, which permeated its institutions and society. Historians differ as to whether or not the end result was the emergence of another, smaller version of China.

But none will question the fact that Chinese influence notwithstanding, the Vietnamese developed and preserved a distinct personality and identity, albeit within China’s cultural sphere. Over the following centuries it became Vietnam’s policy to humor China, pander to it if necessary, avoid any overt provocation and basically keep it at arm’s length.

After the invasion of China by Japan, the creation of the Chinese republic and the colonization of Vietnam by France, political relations between China and the Vietnamese court in Hue slowly dissolved into non-existence.

It was only with the creation of the Chinese Communist Party in 1921 and of the Vietnamese Communist Party in 1930 that a semblance of relations emerged between the two countries. Operating under the umbrella of the Communist International and meeting either in Moscow or in the Communist-controlled areas of China, the leaderships of the two parties were in constant contact and, over the years, developed a strong common ideological basis. Thus with China in the throes of a civil war and Vietnam occupied by the French, the only two components of Chinese and Vietnamese society that were interacting were their respective Communist parties.

The relationship between the two parties took on a completely new dimension in 1950. In December 1946, the uncertain truce between the French forces in Vietnam and the communist Viet Minh broke down as  the two opponents resorted to open warfare. In 1949, the Chinese Communists proclaimed the People’s Republic of China, and in the  autumn of 1950 the Viet Minh defeated the French forces controlling the border areas between Vietnam and China.

The Viet Minh now had a secure rear base in China where it could train its troops in safety and through which it was to receive a massive amount of military aid. This enabled the Viet Minh to expand its areas of control within Vietnam, where by 1953 it had embarked on its first land-reform campaign.

Josef Stalin had encouraged the Vietnamese communists to pattern their land reform on the Chinese model. Ignoring the fact that land tenure in Vietnam differed from that in China, the Chinese cadres assigned to the Viet Minh to oversee the land reform ordered the arrest and sometimes executions of thousands of small farmers whose landholdings were insignificant.

Among those arrested was Nguyen Van Linh, who 33 years later was to become secretary general of the Communist Party of Vietnam and one of the moving forces in the Vietnamese reform movement. From jail Linh smuggled a report to Ho Chi Minh, who with the support of Vo Nguyen Giap, the army commander, called for an emergency plenary meeting of the Communist Party, which decided that China’s land-reform process was not to be a model for Vietnam.

It was to prove the first step in many for the Vietnamese Communist Party’s shift away from China’s ideological orbit.

The second step occurred in the spring of 1954 at the battle of Dien Bien Phu. Prior to that battle, the Chinese military mission attached to the Viet Minh had designed an attack plan based on China’s experience in Korea, which provided for a massed infantry attack supported by an artillery bombardment.

In January 1954, two days prior to the attack, General Giap scrapped the plan. Not only did he postpone the attack by two months, to a time when the monsoon would ground the French air force, but his plan also provided for artillery pieces firing individually in support of a network of trenches, which would smother the French position on the pattern of France’s own 18th-century siege tactics.

By 1954 the Vietnamese Communist Party, while  outwardly maintaining cordial relations with its Chinese counterpart, had weaned itself from both the ideological and the military doctrines prevailing in Mao’s China

The Chinese were incensed, but the strategy worked, and Dien Bien Phu became the first military campaign  that saw the defeat of a Western army by a Third World insurgent force.

Thus by 1954 the Vietnamese Communist Party, while outwardly  maintaining cordial relations with its Chinese counterpart, had weaned itself from both the ideological and the military doctrines prevailing in Mao’s China.

During the second Vietnam War, Sino-Vietnamese relations were in essence governed by geopolitical considerations. For Beijing the main concern, as in Korea, was to ensure that there be no hostile US presence on its border. Thus its support to Hanoi, both military and economic, sought to preserve the existence of North Vietnam as a buffer rather than to promote its conquest of the South.

The fall of Saigon on April 30, 1975, totally changed the context of the relationship. On May 1, Labor Day, South Vietnam’s new Communist rulers were thunderstruck when literally every building in Cholon, the Chinese suburb of Saigon, flew a Chinese flag. It was obviously not a spontaneous act but the result of a decision made in Beijing reaffirming China’s commitment to protecting its community in Vietnam.

For the Vietnamese Communists, it was an unacceptable proposition. They had embarked on a policy of “building socialism” in southern Vietnam, which provided for the nationalization of all significant economic enterprises. With the commercial establishment practically in the hands of the Chinese, “building socialism” put Vietnam on a collision course not only with its Chinese community but also with the Chinese state.

But the fate of the Chinese community was only one of the bones of contention between China and Vietnam. Over the years the Chinese had supported the emergence of a Cambodian communist movement that had seceded from the Vietnamese-inspired Indochinese communist movement. This group, the Khmer Rouge, was now ruling Cambodia and was violently anti-Vietnamese. Thus the regime in Hanoi suddenly found itself confronted by an aggressive Cambodia, a Chinese community it did not fully control, and a hostile China.

It was not a situation Hanoi could contend with alone, and by 1978 the regime, which over the years had navigated a careful course between Beijing and Moscow, had now thrown its lot in with the Soviet Union. By 1979 it had invaded Cambodia, fought a short border war with China and embarked on a policy of socio-ethnic cleansing by inducing hundreds of thousands of its people to flee by boat and seek refuge in neighboring countries of Southeast Asia and in China.

A debilitating occupation of Cambodia, a hostile China on its border, a high state of tension with the Association of Southeast Asian Nations (ASEAN), and a collapsed domestic economy resulting from a blanket policy of collectivization was not a situation the regime in Hanoi felt particularly uncomfortable with. Over the decades, if not centuries, the Vietnamese had kept China at bay, defeated all their enemies, and manipulated all their friends. Confrontation was what they were used to. It was peace that they could not manage.

With China singled out as the enemy, and secure in the economic and military backing of the Soviet Union, Vietnam soldiered on. Then in December 1991 the Soviet Union imploded.

The collapse of the Union of Soviet Socialist Republics had a traumatic effect on Hanoi. For decades Vietnam’s Communist leaders had seen themselves as the “vanguard of the world revolution in Southeast Asia”. Now there was no longer a world revolution. Not only were they ideological orphans but they had also embarked on a policy that, without outside help, was unsustainable.

During their wars against France and the US and their subsequent confrontation with China, Vietnam’s Communists had substantially relied on foreign aid, first from China and subsequently from the Soviet Union. The collapse of the USSR brought to an end Soviet aid. Now, for the first time, Vietnam had to become self–sufficient.

For the regime this was not a matter of choice but of survival. With economic development a priority, and collectivization a flagrant failure, the only option for the country was a step-by-step integration into the global market economy. This in turn could be achieved not only by a departure from the Marxist economic model but even more so by the promotion of a climate of stability. Thus for Vietnam’s Communists normalization with ASEAN and the US and de-escalating their confrontation with China became the priorities.

With no enemy of China to ally itself with, and having given up it hegemonic ambitions in Cambodia, Vietnam from Beijing’s perspective  was thus downgraded to the rank of a smaller, albeit occasionally quarrelsome, neighbor to be watched but with which it could come to terms.

The net result was that the two countries embarked on a process of renewed dialogue at all levels. Party-to-party relations were resumed with the caveat that they were not based on a mutual ideological vision but rather on the principle that each Communist Party actually represented the state.

In parallel, a state-to-state dialogue led in December 2008 to the signing of a land-border demarcation agreement as well as an understanding regarding their maritime border at the mouth of the Gulf of Tonkin. Thus the only current outstanding dispute between China and Vietnam concerns their overlapping maritime claims in the South China Sea.

According to reliable sources it is this claim that precludes China from selling military equipment to Vietnam. However, the fact that Beijing in November last year signed a significant defense deal with Malaysia, which also has maritime claims in the South China Sea, is indicative of the complexity of the issue – a complexity that is reflected both in China increasingly affirming itself in the area and Washington’s policy of trying to contain Beijing.

Currently China is Vietnam’s No 2 trading partner after the United States and is the source of 29% of Vietnam’s imports and the destination of 10% of its exports. Meanwhile, the US is the destination of 21% of Vietnam’s exports and the source of 4.4% of its imports. In other words, Hanoi has succeeded in balancing its economic relations with both powers.

The challenge for Vietnam’s current leadership is to expand the country’s position in the global market economy without alienating its two main trading partners, which happen to be a current superpower and an aspiring one

Politically, however, the Vietnamese have to contend with Washington’s efforts in trying to entice them to become a more active component of its policy of containing China. Thus the US has lifted restrictions on the sale of weapons to Vietnam. In August it transferred six coastal patrol boats to Vietnam, and a visit by a US aircraft carrier is scheduled for next year. That the ultimate aim of the US is to obtain some form of mooring rights, if not more, in Cam Ranh Bay is a given.

The challenge for Vietnam’s current leadership is to expand the country’s position in the global market economy without alienating its two main trading partners, which happen to be a current superpower and an aspiring one.

Within this perspective, China does not have any particular designs on Vietnam. Alternatively, however, were Vietnam to adopt a policy that would lead to a substantive strengthening of the US strategic position in the region, this might change. There is therefore a red line in its relations with the US that Vietnam cannot cross without provoking a reaction from China. The problem is that this red line is undefined is thus creating an area of uncertainty.

On the more positive side, having learned the lessons of the past and with the priority now on development, the likelihood is that Vietnam’s leaders will steer a careful course between China and the United States and avoid becoming embroiled in a confrontation from which, in the long run, they have nothing to gain.