China and Vietnam have resolved a border dispute 30 years after a war which left tens of thousands dead.
The two countries announced they had completed the demarcation just hours before a midnight deadline.
Government teams from both sides had worked for years planting stones to mark the line of the frontier which stretches 1,350 km (840 miles).
China and Vietnam both hailed the agreement, but neither mentioned any progress on a separate maritime row.
Xinhua’s report is here.