Happy Valley creator Sally Wainwright confirmed that the hit BBC One drama will get a highly anticipated third series but admitted it would be a while before audiences can see it.

Sally, who is also responsible for Last Tango In Halifax, gave a frank interview with fellow screenwriter Russell T Davies at the Edinburgh International TV festival about her biggest small screen hits.

Sarah Lancashire has already said she is keen for a third series of Happy Valley (Ben Blackall/Red Productions/BBC)

Speaking about Happy Valley, she said: “It will happen but it will be a little while. I’ve got some good ideas.”

She also confessed the great regret she feels at killing off lesbian newlywed Kate in her popular drama Last Tango In Halifax.

Sally said she was shocked by the backlash she experienced after she killed off the new wife of Sarah Lancashire’s character Caroline and struggled with the public reaction to the storyline.

Sarah Lancashire and Nina Sosanya as Caroline and Kate in Last Tango In Halifax (BBC)

She told Russell: “It was a shock, I didn’t realise how attached the audience had become to that relationship and those characters. I found it hard and I regretted it.

“I wished I had found a better story.”

When he told her he could have predicted the anger of fans, Sally said she wished he had said something, adding: “IÂ was on the cusp and wasn’t sure if it was the right thing to do. You worry afterwards if you could have worked harder or if it was a lazy choice because those were the criticisms.”

She revealed she has just finished writing the Christmas special of the BBC One show.

At Home with the Braithwaites starred Amanda Redman as mum Alison who won the lottery (Anthony Devlin/PA)

Sally, who confirmed she is working on a TV musical, also said she would be open to bringing back her hit show At Home With The Braithwaites, her sitcom about a woman who wins the lottery but hides it from her family, which ran from 2000 to 2003.

Asked if she would bring it back she said: “Yeah, okay. It might be quite interesting but it’s probably a mistake.”

She also spoke frankly about how accusations of plagiarism over her show Bonkers in 2007 affected her and her work.

She told Russell: “It was weird, it was very strange. I didn’t really believe it. I didn’t believe it would progress and it didn’t because it was completely unfounded, this woman was strange and bonkers herself.

Suranne Jones starred in drama Unforgiven, inspired by Sally’s experience of the law (Ian West/PA)

“But even at the time I went into quite a dark place and, looking back, it was a bit of a new period in my writing, it affected me very deeply.

“Finding yourself in the legal system, thinking about what could have happened, was ridiculous.”

She said her show Unforgiven, starring Suranne Jones as a woman recently released from prison, came out of what she went through.

She said: “It never went to court but it made my work darker. Prior to that happening I was chiefly a comedy writer.”