Chinese President Xi Jinping gestures the way to Britain's Prime Minister Theresa May ahead of their meeting in Beijing on February 1, 2018.

A British Royal Navy warship sailed close to islands claimed by China in the South China Sea as it headed towards Vietnam, asserting "freedom of navigation" rights and challenging Beijing's "excessive claims" in the region, two sources said.

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

The Albion was on its way to Hanoi, 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 recognize excessive maritime claims around the Paracel Islands. Twelve nautical miles is an internationally recognized territorial limit.

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

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

Neither China's Foreign nor Defence Ministries immediately responded to a request for comment.