The BBC has defended the dark themes of its most recent Doctor Who storyline after complaints from some viewers.

Saturday night’s edition of the show – the first of a two-part climax to the series – saw the Doctor and sidekick Clara Oswald caught up a plot dealing with the afterlife, which then led into an invasion of earth by the Cybermen.

In the episode, Clara’s boyfriend Danny appeared to have been killed in a car accident and viewers heard references to how the bodies of the dead could feel the pain of being cremated.

In a response to the complaints, the BBC said it was stated within the episode that some of theories about the afterlife could be “distressing” and later proved to be a “con”. And it said the themes were considered to be “appropriate”.

In a statement, the BBC said: “Doctor Who is a family drama with a long tradition of tackling some of the more fundamental questions about life and death. We were mindful of the themes explored in Dark Water and are confident that they are appropriate in the context of the heightened sci-fi world of the show.

“The scene in which a character reveals 3W’s unconventional theory about the afterlife was preceded by the same character warning the Doctor and Clara several times that what they were about to hear could be distressing.

“When the Doctor does hear these claims, he immediately pours scorn on them, dismissing them out of hand as a ‘con’ and a ‘racket’. It transpires that he is correct, and the entire concept is revealed to be a scam perpetrated by Missy.”

The storyline reaches its conclusion on Saturday.