China has accused the UK of "provocative actions", after a British warship sailed close to the disputed Paracel islands in the South China Sea.
The Chinese told HMS Albion to leave in "an aggressive manner", taking position "irresponsibly close" to the ship, the BBC's Jonathan Beale has been told.
The Royal Navy said it was conducting a freedom of navigation exercise "in full compliance with international law".
But China said the UK had entered its territorial waters without permission.
A source told the BBC that a Chinese warship tailed the Albion from just 200 metres, while Chinese jets flew low over the British warship during the encounter.
The Paracels are controlled by China but also claimed by Vietnam and Taiwan.
China's definition of the 12-mile limit around the islands is not the same as those limits which have been internationally recognised.
The UK Ministry of Defence has insisted the Albion was always in international waters.
Details of the challenge have not been made public, but both sides are said to have remained calm during the encounter on 31 August.
HMS Albion, an 18,000 tonne amphibious warship carrying a contingent of Royal Marines, then docked at Ho Chi Minh City, in Vietnam, on Monday.
The naval stand-off comes at a time when the UK is courting China in the hope of securing a favourable post-Brexit trade deal.
In a statement to news agency Reuters, China's foreign ministry said HMS Albion had "infringed on China's sovereignty".
"China strongly opposes this and has lodged stern representations with the British side to express strong dissatisfaction," it said.
It said Beijing urged the UK to "immediately stop such provocative actions, to avoid harming the broader picture of bilateral relations and regional peace and stability."
China's territorial claims in the South China Sea have long been a source of dispute, with Vietnam, the Philippines, Taiwan, Malaysia and Brunei all contesting its actions.
The sea is a major shipping route and home to abundant fishing grounds that supply the livelihoods of people across the region.
It is also home to two largely uninhabited island chains - the Paracels and the Spratlys - which are said to have reserves of various natural resources around them.
China claims by far the largest portion of territory - an area defined by the "nine-dash line" which stretches hundreds of miles south and east from its most southerly province of Hainan.
It has backed its expansive claims with island-building and naval patrols.
However, a landmark judgement at the Hague in 2016 criticised Chinese actions in the South China Sea and found no basis for its sweeping historical claims.
China called the ruling "ill-founded" and said it would not be bound by it.
China frequently challenges foreign vessels in the South China Sea.
Since 2015, the US Navy has been conducting freedom of navigation operations (FONOPs) in the area to ensure access to key shipping and air routes - and has urged key international allies to do the same.
China has accused Washington of militarising the region.
Last month, the UK Defence Secretary Gavin Williamson gave a speech in Washington in which he said China needed to recognise and abide by international norms.
FONOPs - as they are known - challenge territorial claims on the world's oceans and maintain international law. Both Britain and the US conduct such operations throughout the world.