Warning – contains spoilers

The creator of the hit BBC drama Bodyguard has said he decided to kill off Keeley Hawes’ character halfway through the series precisely because viewers would never expect such a major star to be written out.

Jed Mercurio said there was increasingly an expectation that TV dramas go on for series after series during which “nothing much changes for the main stars”, prompting his decision to have the home secretary, Julia Montague, killed off in an apparent terrorist bombing at the end of the third episode.

“I like to try to do things that move the story on, and with Bodyguard I wanted to have this event mid-series that would completely alter the dynamic,” he told Radio Times in an interview published in this week’s edition of the magazine.

The BBC One series has continued to add viewers throughout its run, with 7 million people tuning in to the live broadcast of episode four on Sunday night, according to overnight viewing figures. Millions more viewers are watching each episode on catch-up, making the show one of the biggest drama successes in recent UK television history.

Mercurio told the magazine he believed that Hawes felt “that it’s better to do a few episodes of something meaty than lots of episodes of something thin”.

Keeley Hawes as Julia Montague in Bodyguard. Photograph: BBC/World Productions/Sophie Mutevelian

“I remember watching TV as a kid and, whenever there was some sort of jeopardy involving the hero, I could reassure myself that they were what I’d call a ‘can’t-die’ character, so everything would be OK,” he said, explaining the decision to kill off the female lead character – although there has been speculation that Mercurio, Hawes and the Radio Times could be hiding one final twist.

The writer also dismissed concerns that the decision to show a Muslim suicide bomber risked perpetuating stereotypes, insisting viewers would have to watch to the end of the series to fully understand who is “plotting to do harm”.

“The other thing,” he said, “is that, unfortunately, the reality of our situation is that the principal terror threats in the UK do originate from Islamist sympathisers. I do understand that’s different from the religion of Islam, but it’s the reality of who the perpetrators are of the majority of the offences. If the show were set in the recent British past, the attackers might be Irish Republicans.”

Despite speculation that Hawes’ character could still be revived, the actor appeared to draw a line under the series and tweeted on Monday that it had been “amazing to be part of” the programme.

It has been amazing to be part of #Bodyguard.

Everyone’s enthusiasm for the show has made it so exciting. Thanks again for watching and for the lovely messages.

And Iiiiieeiiiieeeiiiiiiiiii will always love youuuuuuuuuuuuu! @_richardmadden pic.twitter.com/ZkLs8PPhn9 — Keeley Hawes (@Misskeeleyhawes) September 10, 2018

Mercurio, who is already working on the new series of his BBC drama Line of Duty, also said that he would “absolutely” like to do a second series of Bodyguard but it would depend on how the broadcaster felt following the final episode and the availability of actor Richard Madden, who plays the home secretary’s close protection officer in the programme.

The programme’s continued success has hit ITV’s big-budget drama Vanity Fair, which goes head-to-head with Bodyguard in the Sunday night 9pm slot. Its latest episode reached a combined audience of just 2.7m viewers – less than half the live audience of its BBC rival.