China has expressed anger after a British Royal Navy warship sailed close to islands claimed by China in the South China Sea late last month, saying Britain was engaged in “provocation” and that it had lodged a strong complaint.

The HMS Albion, a 22,000 ton amphibious warship carrying a contingent of Royal Marines, passed by the Paracel Islands in recent days, two sources, who were familiar with the matter but who asked not to be identified, told Reuters.

The Albion was on its way to Ho Chi Minh City, where it docked on Monday following a deployment in and around Japan.

One of the sources said Beijing dispatched a frigate and two helicopters to challenge the British vessel, but both sides remained calm during the encounter.

The other source said the Albion did not enter the territorial seas around any features in the hotly disputed region but demonstrated that Britain does not recognise excessive maritime claims around the Paracel Islands. Twelve nautical miles is an internationally recognised territorial limit.

The Paracels are occupied entirely by China but also claimed by Vietnam and Taiwan.

China’s foreign ministry, in a faxed statement sent to Reuters, said the ship had entered Chinese territorial waters around the Paracel Islands on 31 August without permission, and the Chinese navy had warned them to leave.

“The relevant actions by the British ship violated Chinese law and relevant international law, and infringed on China’s sovereignty. China strongly opposes this and has lodged stern representations with the British side to express strong dissatisfaction,” the ministry added.

“China strongly urges the British side to immediately stop such provocative actions, to avoid harming the broader picture of bilateral relations and regional peace and stability,” it said.

“China will continue to take all necessary measures to defend its sovereignty and security.“

The encounter comes at a delicate time in London-Beijing relations.

Britain has been courting China for a post-Brexit free trade deal, and both countries like to describe how they have a “golden era” in ties.

A spokesman for the Royal Navy said: “HMS Albion exercised her rights for freedom of navigation in full compliance with international law and norms.“

China’s claims in the South China Sea, through which some $3tn of shipborne trade passes each year, are contested by Brunei, Malaysia, the Philippines, Taiwan and Vietnam. Britain does not have any territorial claims in the area.

While the US Navy has conducted Freedom of Navigation Operations (FONOPs) in the same area in the past, this British challenge to China’s growing control of the strategic waterway comes after the United States has said it would like to see more international participation in such actions.

Both Britain and the United States say they conduct FONOP operations throughout the world, including in areas claimed by allies.