The United States ended part of a decades-old arms embargo on Vietnam, propelled by China’s aggressive behavior and particularly Beijing’s heavy-handed search for energy riches in the South China Sea.

Really rolling back the embargo, as proponents such as Sen. John McCain have been advocating, would represent the culmination of a remarkable shift in U.S. relations with Vietnam. It would also be a sign that, for all the distractions that have sucked President Barack Obama’s foreign-policy attention back to the Middle East of late, the pivot to Asia is far from dead.

The State Department said Thursday, Oct. 2, that the United States will allow some arms sales to Vietnam. "The State Department has taken steps to allow for the future transfer of maritime security-related defense articles to Vietnam," said spokesperson Jen Psaki at a briefing.

Reuters reported last month that the Obama administration was close to changing its policy regarding arms sales to Vietnam, which have been banned since shortly after the end of U.S. involvement in the Vietnam War. The change of policy comes after a summer of high-profile visits to Vietnam by U.S. officials, including McCain and the chairman of the Joint Chiefs of Staff. It also comes after China dispatched a drilling rig to disputed waters off the Vietnamese coast, leading to months of naval jousting, riots, and rising tensions across the region.

"What we have found is a partner in which our interests are converging," a senior U.S. official told Reuters, which reported that initial arms sales could include P-3 patrol planes that could help bolster Vietnam’s ability to police its coast. Vietnam has already sealed deals for advanced submarines with Russia and patrol boats from Japan, in large part to help it counter China’s recent naval modernization.

Though communist Vietnam and China have close ties, especially thanks to trade, relations nose dived this spring and summer after China sent its billion-dollar deepwater drilling rig to waters inside Hanoi’s exclusive economic zone. Chinese and Vietnamese coast guard vessels tangled repeatedly, shot each other with water cannons, and Vietnamese vessels were rammed and damaged.

"The oil rig incident was clearly a catalyzing event for the Vietnamese," said Ely Ratner, deputy director of the Asia-Pacific Security Program at the Center for a New American Security.

The United States, for its part, has been warily watching as China stepped up its claims to disputed islands and waters in the South China Sea, including the establishment of an air-defense identification zone and the apparent construction of military installations on barren rocks. After the drilling rig helped ratchet up naval tensions even further, U.S. officials including Secretary of State John Kerry repeatedly admonished Beijing.

"Opportunities like this – building partner capacity on maritime domain awareness – are a sweet spot for shaping the regional environment in ways that could deter Chinese aggression without Washington having to do anything overly provocative," Ratner said.

The Vietnamese government in late September said it wants to be able to purchase arms from the United States, and called the ban "abnormal." It said such a move shouldn’t worry China.

The idea of adding arms sales to a burgeoning U.S.-Vietnam commercial relationship has been steadily bubbling all year. The Philippines, a U.S. treaty ally, has grown closer to Washington in the wake of Chinese intimidation at sea. And Japan has been able to push back against Chinese claims to the Senkaku islands (known in China as the Diaoyu) in part thanks to U.S. treaty obligations to defend Japan.

One of the strongest indications of an end to the arms embargo came in August, when Arizona’s McCain, a one-time GOP presidential nominee, called for a change to U.S. policy and said it could happen as soon as this fall. "I believe the time has come for the United States to begin easing our lethal arms embargo on Vietnam," he said, conditional on Hanoi improving its human-rights record.

Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff, also visited Vietnam in August. He said that if the embargo were lifted, the United States should help Vietnam improve its navy so that it is better able to deal with maritime disputes, such as the months-long standoff over the Chinese drilling rig.

"In terms of managing its maritime resources and managing the territorial disputes, I’d suggest as goes Vietnam, I think as goes the South China Sea," Dempsey said.

China withdrew the controversial drilling rig ahead of schedule this summer, prompting some to speculate that the aggressive move had backfired and made Beijing reconsider its confrontational approach. Indeed, China’s actions have prompted a historic about-face in Japan’s security policies and helped push countries in the region, including Australia, closer to the United States.

But neither the sovereignty disputes in the South China Sea nor China’s quest for energy resources are going away anytime soon, meaning that Vietnam’s need for more muscle to stand up to Beijing won’t either.

China’s energy hunger, in particular, is acute. The country recently overtook the United States as the world’s biggest oil importer. And China’s hopes of phasing out its reliance on dirty coal with cleaner natural gas took a blow this summer when Beijing slashed its expectations for domestic natural-gas production from shale. While China is ramping up energy ties with Russia, among others, it is accelerating its own search for oil and gas reserves in the South China Sea.

This month, China’s National Offshore Oil Corporation, or CNOOC, said that wells drilled by deepwater rig had found a very large gas field, though not in the waters off the Paracel Islands that caused so much tension with Vietnam. CNOOC’s chairman told Xinhua that the discovery "opened the door" to further deepwater oil and gas exploration in the South China Sea.

And China will be prepared to take advantage of deepwater opportunities: It is building another pair of deepwater rigs and adding more coast guard ships to protect them. At the height of the standoff with Vietnam, China deployed scores of coast guard vessels to protect the rig and enforce an unusually large no-go zone around it.