London: A UK government spokesman has said that Iranian boats tried to intercept a British oil tanker near the Gulf region, before being driven off by a Royal Navy ship, the media reported on Thursday.

On Wednesday, HMS Montrose positioned itself between the three boats and the tanker British Heritage before issuing verbal warnings to the Iranian vessels, the BBC quoted the spokesman as saying.

He described the Iranians' actions as "contrary to international law".

According to US media reports citing American officials, boats believed to belong to the Iranian Revolutionary Guard Corps approached the British Heritage tanker as it was moving out of the Gulf into the Strait of Hormuz.

Meanwhile, Iran also summoned the British ambassador in Tehran to complain about what it said was a "form of piracy".

Earlier on Wednesday Iranian President Hassan Rouhani mocked the UK, calling it "scared" and "hopeless" for using Royal Navy warships to shadow a British tanker in the Gulf.

HMS Montrose had shadowed British tanker the Pacific Voyager for some of the way through the Strait of Hormuz, but that journey passed without incident.

This latest row comes at a time of escalating tensions between the US and Iran, the BBC said.

US President Donald Trump's administration - which has pulled out of an international agreement on Tehran's nuclear programme - has reinforced punishing sanctions against Iran.