By Mai Nguyen and Ben Blanchard
HANOI/BEIJING (Reuters) - China and Vietnam agreed on Monday to use an existing border dispute mechanism to find a solution to a territorial dispute in the South China Sea, saying they did not want it to affect relations.
The two countries have sought to patch up ties since their long-running row erupted in May, triggered by China's deployment a drilling rig in waters claimed by the communist neighbours, which lead to confrontation at sea between rival vessels and violent anti-Chinese protests in Vietnam.
After a meeting between China's top diplomat, State Councillor Yang Jiechi, and Vietnam Foreign Minister Pham Binh Minh in Hanoi, China's foreign ministry said they had agreed to "appropriately handle the maritime problem".
The two exchanged smiles and warm handshakes in contrast to Yang's last visit in June, which ended in acrimony with Yang accusing Vietnam of "hyping up" their dispute, which was the worst breakdowns in their relations since a brief border war in 1979.
The rapprochement began in late August, a few weeks after Vietnam started courting other countries embroiled in maritime rows with China, including the Philippines and China's biggest investor, Japan, which will provide boats and radar equipment to Vietnam's coastguard.
Most significant for Vietnam has been improvements in its defence ties with former foe the United States, including an Oct. 2 U.S. decision to start easing a three-decade arms embargo, which would strengthen Vietnam's coastguard capability and in future lead to weapons sales, ships and airborne systems.
China and Vietnam would "properly use a border negotiation mechanism between the two governments to seek a basic, lasting resolution both sides can accept", the Chinese foreign ministry said.
'CRUCIAL STAGE'
They also agreed to "manage and control maritime disputes, not take any acts to complicate or expand the disagreement".
"At present, Sino-Vietnam relations are at a crucial stage of improvement and development," the ministry cited Yang, who outranks the foreign minister, as saying.
The Chinese statement made no mention of the $1 billion rig, Haiyang Shiyou 981, which China moved out of the contested waters on July 15, saying its activities were complete.
Last week, Chinese and Vietnamese leaders met on the sidelines of an Asia-Europe summit in Italy and agreed to "address and control" maritime disputes.
Communist parties rule both countries and their trade has swelled to $50 billion (31 billion pounds) annually, but Vietnam has long been suspicious of its giant neighbour, especially over China's claims to almost the entire South China Sea.
A warming of ties would be favourable to Vietnam's leadership, which found itself in a tricky spot domestically, needing to contain simmering anti-China sentiment over perceived bullying while not provoking a neighbour crucial to its far smaller economy.
Analysts say the issue is likely to have been a hot debate within Vietnam's secretive Communist party, where members are believed to have mixed opinions about ties with China.
Vietnam's Foreign Ministry said it was important for both sides to "seriously" and "urgently" fulfil their commitments.
"Vietnam-China relations developing healthily and stably is suitable with the desire and fundamental interests of the two countries, benefiting peace, stability and development," it said in a statement. "Both sides will together make an effort to seriously implement the agreements."
The Philippines, Malaysia, Brunei and Taiwan also have claims to parts of the potentially energy-rich waters, and China has looked on with suspicion at what it sees as U.S. moves to "provoke" tension by supporting its regional allies, such as the notably the Philippines, as well as Vietnam.
(Writing by Ben Blanchard and Martin Petty; Editing by Robert Birsel)