A new film in which an amateur cyclist set out to prove he could outsmart doping tests transformed into something rather more different when the film maker realised he was taking advice from the figure at the very heart of the recent Russian doping scandal. Icarus, which premières at the Sundance Film Festival this week, instead became the story of the doping whistleblower, Dr Grigory Rodchenkov.

The initial premise of the film was that comedian Bryan Fogel would explore the impact of performance-enhancing drugs by doping himself.

The LA Times reports that US anti-doping experts pointed him in the direction of Rodchenkov, who was then head of Moscow’s Anti-Doping Centre. However, as the film progresses, it becomes clear that this man is not only central to Russian anti-doping efforts, but to its doping ones too.

Within a few months, Fogel was taking advice about the use of illegal drugs and Rodchenkov goes on to demonstrate for the camera precisely how Russian athletes' urine samples were tampered with.

“It took me some time to realize that Grigory wasn’t the salmon,” says Fogel. “He was the great white shark.”

By now, it was clear that the documentary had become something rather different than had initially been envisaged.

Rodchenkov became more and more anguished about Russian doping practices in the run-up to the 2016 Rio Summer Games and ultimately blew the whistle on a state-backed programme designed to help drugs cheats escape detection.

The film shows how Fogel helped the Russian flee to the US and then, when two of his former colleagues died “unexpectedly”, arranged for him to meet with reporters from the New York Times to tell his story.

“Once it became clear who Grigory really was, everything changed,” said producer, Dan Cogan. “All of a sudden we’re thinking ‘how do we keep this person — or even us — safe from the Russians?"

Icarus is showing as part of the US Documentary Competition at the Sundance Festival. Its future depends on who buys the film, but its backers are confident that it will be widely distributed.