One morning last June, the people of Vietnam woke up to someone else's oil rig in their backyard. The 30,000-ton Haiyang Shiyou-981, owned by the China National Offshore Oil Corporation, was parked 70 miles inside waters controlled by Vietnam.

The resulting standoff at sea, in which one Vietnamese fishing boat was sunk, has driven Vietnam to seek assistance from an unlikely source. Vietnam has requested its old enemy, the United States, sell it weapons to counter an even older enemy, China.

Vietnam and China have shared a mutual border for more than 2,000 years. Those have not exactly been happy years for Vietnam, as it has often ended up a colony or vassal state of its larger neighbor. Vietnam has suffered political, economic, and cultural imperialism and in the course of their shared history, Vietnam has taken up arms against China several times to assert its independence.

This history has made Vietnam understandably wary of China and its intentions. Although Vietnam has benefited economically from China's spectacular economic growth, it has been alarmed at the steady expansion of Chinese military power. Vietnamese defense spending has quadrupled since 2004, in direct response to China's own growing defense budget.

In June of this year, Vietnam's fears were realized when the Haiyang Shiyou-981 oil rig was towed to a location in the South China Sea claimed by both sides. The incident sparked angry protests across Vietnam and a confrontation at sea until the rig was pulled out two months later.

Although the two countries share a land border, Vietnam's territorial dispute with China is actually taking place at sea. The 1982 U.N. Convention on the Law of the Sea allows all countries to claim an Exclusive Economic Zone (EEZ) extending 200 miles from their coastline. Foreign ships and aircraft may pass through an EEZ, but all resource development such as mining, fishing, and drilling is controlled by the country claiming it. In the disputed area, Vietnam claims an EEZ extending from its coastline, while China's claim extends from the nearby Paracel Islands, and the oil rig was placed where the two claims overlap.

Outspent by a factor of 56 to 1 on defense, Vietnam can either give China what it wants or look for powerful allies with shared interests. More than forty years after the war, the strategic interests of Vietnam and the United States are aligning again, and the U.S. is preparing to sell Vietnam weapons to defend itself from China.

The United States and Vietnam fought a long, bloody war between 1965 and 1973. The United States lost 58,220 military personnel in the Vietnam War, with another 1.3 million Vietnamese military and one million civilian casualties on both sides. The war bitterly divided the American people and soured U.S.-Vietnamese relations for decades. Diplomatic relations were only normalized in 1995.

Still, despite the horrendous losses incurred during the war, Vietnam remains a remarkably pro-American country. In July, a Pew Research poll noted 76 percent of Vietnamese have a favorable opinion of the United States. The same poll noted only 16 percent of Vietnamese had a favorable opinion of China.

It's no secret that the United States has worried about the expansion of Chinese military power. The U.S., distracted by wars in Iraq and Afghanistan, has neglected Asia. The so-called "Asia Pivot" has been an attempt to correct that, broadening old alliances while forming new agreements with countries not traditionally American allies, but which share an interest in containing China.

Vietnam would probably like a full array of modern American weapons, but fiscal and geopolitical realities must temper expectations. American weapons are expensive — a single F-35 fighter bomber costs $100 million, and Vietnam's entire defense budget is only $7 billion.

The United States will — at least for the foreseeable future — refuse requests to sell deadly weapons like bombs or missiles to Vietnam. If American weapons caused Chinese casualties, no matter who was at fault in the incident, the U.S. would be held responsible.

But Washington is providing Vietnam with non-lethal weapons that can document China's territorial incursions, so they can be publicized and sent to international arbitration. The United States is in talks with Vietnam to provide refurbished surveillance aircraft. P-3 Orion maritime patrol aircraft were first introduced in the 1950s, and are currently being replaced in U.S. inventories by the newer P-8 Poseidon. The aircraft are equipped with sonar and radar, and are manned by a crew of 11. Although old, the aircraft are dependable aerial surveillance platforms capable of monitoring huge distances.

Vietnam is traditionally thought of as a land power, a legacy of its 20th Century wars against France, the U.S., and China, but in reality it is a maritime power. It has a coastline as long as the East Coast of the United States, and an EEZ of 867,620 square miles. Although ships are best suited to carry out on the spot inspections of foreign vessels passing through an EEZ, a patrol aircraft such as the P-3 is best for monitoring large swathes of ocean.

P-3 Orions are normally outfitted with depth charges and torpedoes to hunt submarines, and anti-ship missiles and rockets to engage surface ships. Vietnam's Orions will reportedly be sold unarmed. That's not to say that they won't eventually be armed — there are plenty of other countries, such as Japan, India, and France — who could sell the Vietnamese weapons.

Other weapons and equipment the U.S. might sell would be air and maritime surveillance radars, communications equipment, and coast guard ships. The time might come when the U.S. sells deadlier, more advanced weapons to Vietnam, but for now such a sale would entail too much risk for America.

The eventual withdraw of the Haiyang Shiyou-981 oil rig may be the end of Vietnam and China's dispute, at least for now. Vietnam needs good relations with China to keep its economy going, so from its perspective the sooner the crisis ends, the better. Still, neither side is going anywhere, and population pressure will likely force another standoff. In the long term, China's growing energy needs may push it to again send oil rigs into the disputed area, this time for good.

Meanwhile, the United States is positioning itself as a balancer to China. Washington is not even trying particularly hard to do so, letting the crisis, and by extension China, sell such an arrangement all by itself. How close the U.S. and Vietnam grow is almost entirely up to China.