A planned goodwill visit by a German naval frigate to China has been called off following objections from officials in Beijing.
"After a certain period of consideration, China has decided that it does not want a port visit by the German frigate Bayern and we have taken note of that," a Foreign Office spokeswoman said in Berlin on Wednesday.
The frigate sailed from Wilhelmshaven to the region on August 2.
The German government said in April that it wanted to strengthen security co-operation in Asia and coordinate more closely with Japan in particular.
The declared aim was "a rules-based order, free sea lanes and multilateralism," and this was to be linked with a friendly gesture towards China - the port visit that has now been rebuffed.
There is a territorial dispute between China and other countries in the South China Sea.
China claims 80 per cent of the resource-rich sea, through which several important international shipping lanes pass.
Vietnam, the Philippines, Taiwan, Brunei and Malaysia all have territorial claims in the region.
The International Court of Arbitration in The Hague rejected China's claims in 2016 but officials in Beijing continue to ignore the ruling.
Australian Associated Press