JK Rowling is sorry for killing off Severus Snape in the Harry Potter series, the best-selling author has said.

The writer apologised for the potions professor's death shortly ahead of the anniversary of the fictional Battle of Hogwarts - during which many wizarding characters were killed.

Professor Snape met his end in the final installment of the seven-book series when he was bitten by Lord Voldemort's snake Nagini.

Rowling has often apologised for the bloody Battle of Hogwarts, which took place on May 2.

Now she has taken to Twitter to console fans over Snape's poignant demise.

On Tuesday, she wrote on social media: "In case the police are reading my notifications, there's a Battle of Hogwarts anniversary tradition going on. I am not on a murder spree.

"OK, here it is. Please don't start flame wars over it, but this year I'd like to apologise for killing (whispers)... Snape. runs for cover"

In the past, Rowling has apologised for the deaths of other popular characters from the Potter books.

Two years ago, she apologised for killing off Fred Weasley, one half of the Weasley twins, and in 2016 she expressed her remorse for the death of werewolf Lupin, who had just become a father to baby Teddy.

Alan Rickman, who died in January last year, played Professor Snape in the film version of Harry Potter.

The character, despite being a long-term nemesis of Harry, was one of the most liked and memorable characters from the series.