The United States and countries bordering the Pacific have signed a deal to reduce the chance of accidental clashes at sea.
The agreement aims to increase communication between ships in crowded shipping lanes.
The code is not legally binding and has no bearing on conflicting territorial claims in the East and South China seas.
But officials say it gives captains procedures to reduce tension.
The Code for Unplanned Encounters at Sea was signed by more than 20 countries including Japan, the Philippines and Malaysia, as well as China and the United States.
With the Chinese navy growing rapidly in strength, the shipping lanes off its coast have become a potential flashpoint.
Chinese vessels repeatedly challenge Japanese control of the waters around the disputed Senkaku or Diaoyu islands.
Late last year a US navy cruiser had to take urgent evasive action to avoid a Chinese warship escorting Beijing's new aircraft carrier.
The new code could help prevent accidental clashes, by giving captains mutually agreed codes and procedures to stop accidents escalating into potential clashes.
But American officials were quick to point out that the agreement is not legally binding, and will do nothing to inhibit deliberate aggression.
It also has no bearing on the underlying causes of the tension: China's increasingly assertive claim to disputed islands and territorial waters; increasingly hostile relations between Beijing and Tokyo - and burgeoning rivalry between a rising China and the established power of the United States navy in the western Pacific.
But analysts say the fact that China has agreed to sign, along with the countries that feel must threatened by its growing power, is a positive sign.
They say it is an acknowledgement that accidental encounters at sea could pose a real threat to peace in the region.