When Andrew Scott first appeared on screen as Sherlock’s arch-nemesis Moriarty, his coruscating performance left many viewers wanting more – assuring him a place, not only as a major character on the show for years to come, but also as one of the most memorable Moriartys ever.

And it seems Scott very much made his own luck, because that now iconic confrontation between Moriarty and Sherlock at the end of series one finale The Great Game – “I will burn you. I will burn the heart out of you” – was included specially for him after his scintillating audition convinced Sherlock creators Mark Gatiss and Steven Moffat to give him a much bigger part in the episode.

“We didn’t really have a scene for Moriarty in the original version of The Great Game,” said Steven Moffat, speaking at a Bafta event ahead of the fourth series of Sherlock. “It was going to be a big reveal that that young fella you’d met earlier, that camp young fella [Molly Hooper’s boyfriend ‘Jim’], turns out to be Moriarty, but you don’t see him in his own form.”

“He was just going take his sunglasses off [as an indication],” added producer Sue Vertue.

For the auditions, Moffat and Gatiss had written a scene that included some dialogue we now recognise from the show, but it wasn’t complete and it was never intended to be included in the episode – until Andrew Scott got his hands on it…

“So we concocted a ludicrous scene where Moriarty’s being bonkers, and saying things, you know ‘I will burn the heart out of you,’ on the basis that this is going to be the kind of nonsense that he’s going to have to say in the future,” said Moffat.

“And a bunch of actors came in, did fine. Presumably stared at the script and said ‘Dear God.’ But Andrew absolutely went for it. And we thought, not only are we going to cast him, but by some means we’re going to include that scene in the episode.

“And we rewrote the end of the episode so that Moriarty… for no particular reason, turns up in the swimming pool, is going to kill them, changes his mind and goes away again.”

And that, as they say, is history...

Sherlock series four: The Six Thatchers is on New Year's Day at 8:30pm on BBC1