Brexit voters may struggle to get their heads around the idea of a female star of Doctor Who, the BBC show’s writer has suggested.

In a barbed comment about the millions who voted for Britain to leave the EU, Steven Moffat hinted that ‘liberal’ Remainers were more comfortable with an actress playing the Doctor.

The 56-year-old suggested that Brexit-voting viewers might be harder to keep on board after Jodie Whittaker takes the role later this month because they do not have ‘progressive’ views.

Brexit voters may struggle to get their heads around the idea of a female star of Doctor Who, the BBC show’s writer Stephen Moffat has suggested

Moffat said that the writers had to worry about these viewers saying: ‘That’s not the same person.’

He added: ‘This isn’t a show exclusively for progressive liberals, this is also for people who voted Brexit.

‘That’s not me politically at all, but we have to keep everyone on board.’

The writer, who has worked on Doctor Who since 2005, said now was the right time to give the show’s lead role to a woman.

Broadchurch actress Miss Whittaker, 35, will take over from Peter Capaldi in the new series. Moffat, who also created the BBC’s Sherlock, told the Radio Times: ‘If we’d replaced David Tennant with a woman it wouldn’t have worked.

‘It was too early. We could have replaced Matt Smith with a woman, given that his Doctor was more sexless and less of a lad, but then I got obsessed with seeing Peter in the Tardis.

Moffat hinted that ‘liberal’ Remainers were more comfortable with an actress playing the Doctor. Jodie Whittaker takes the role later this month

‘Then I turned [villain] the Master into Missy and no one had any problem with that being the same character.’

Capaldi, 59, will leave his role as the Doctor after four years during this year’s Christmas Day special.

It will also be Moffat’s final episode, with Broadchurch writer Chris Chibnall to take over as head writer. Radio 2’s Jo Whiley, who saw some of the special being filmed, said: ‘There was a scene that they had to film and everyone was in tears.

‘Because of the poignancy of the scene that they were filming, which had less to do with the Doctor himself and more to do with the storyline.

‘And everyone was in pieces. And when you watch the Christmas Day episode, you’ll understand. It’s really very, very clever, and very laced with emotion.’