The BBC is trying to establish whether an episode of Sherlock was deliberately leaked from within the offices of a Russian state broadcaster, after last night’s hotly-anticipated series finale was circulated on the internet ahead of transmission.

A Russian-language version of the 90-minute episode, entitled The Final Problem, appeared online on Saturday, featuring a three-second continuity announcement identifying it as having originated from Channel One, which holds the rights to air Sherlock in Russia.

BBC Worldwide, which sells the corporation’s content overseas, said it had “initiated a full investigation” into the leak, which analysts suggested could have been deliberately orchestrated to damage the British broadcaster.

The Kremlin is thought to have been angered by a recent decision to expand the BBC World Service’s Russian language output, and also threatened reprisals against the corporation after a short-lived attempt by NatWest to close bank accounts linked to Russia’s English language broadcaster, RT.

In October a spokeswoman for Russia’s foreign ministry said that the abortive attempt to close RT’s accounts “reeked of” the BBC, claiming that state-owned Natwest was acting to help Britain’s national broadcaster.

The spokeswoman warned: “Our stance is straightforward: we will stick up for our own. They [Britain] will get as good as they give.”

Alexander Yakovenko, Russia’s ambassador to the UK at the time, quoted Sergey Lavrov, the foreign minister, saying: “Never do to others what you don’t want them to do to you.”

Western security officials have warned of Russia’s increasing use of cyber-attacks, which have included the hacking of Democratic Party emails in the run-up to the American election.

Analysts suggested that the Sherlock leak could form part of Russia’s threatened retaliation against the BBC.

Ben Nimmo, information defence fellow at the Atlantic Council think tank, said: “As Sherlock Holmes said himself, ‘When you’ve eliminated the impossible, whatever remains, however improbable, must be the truth’.

"There appears to be no profit motive, no benefit to the broadcaster from doing this. What remains is a political motive. The most obvious explanation is that this is punitive.”

Another Russia analyst, Lilit Gevorgyan, senior economist at IHS Global Insight, said: "There has been a pattern of Russia making short term tactical gains at the expense of long-term strategic losses, so we cannot entirely exclude the possibility that this is a deliberate act.

"But it would be so damaging, one has to question whether it would be worth it. So it could be a simple case of poorly executed intellectual property handling."

Sherlock is one of the BBC's biggest international success stories. The corporation recently revealed that the 2015 festive special, The Abominable Bride, was its biggest overseas export of the last financial year, selling to 216 territories across the world.

The corporation is understood to have upgraded its file security after scripts and unfinished footage from Doctor Who leaked from the Miami office of BBC Worldwide in 2014.

A source at the corporation said: “We have brought everything up to beyond gold standard, which is why things like this are so surprising. This is more than an accident.”

The broadcaster is understood to be working with Channel One in Russia to work out how the Sherlock episode found its way online.

A spokesman said: "BBC Worldwide takes breaches of our stringent content security protocols very seriously and we have initiated a full investigation into how this leak has occurred.”

Russia’s Channel One did not return requests for comment.