JK Rowling has responded to a mother's heartfelt letter in which she described how the Harry Potter series had provided comfort during her daughter's cancer treatment.

Chrissy Hart told the author in a letter last month that her books "turned out to be the fortress we so desperately needed to hide in" when her daughter's prognosis worsened. She died last week.

In a tweet, which ended with a broken heart emoji, JK Rowling wrote: "I think I wanted to write because words were always my safe place. I only wish words could bring her back to you."

Mrs Hart's letter was read out at Letters Live in London - a series of performances in which remarkable letters are read aloud - by actresses Carey Mulligan and Ellie Bamber.

In the moving letter, Mrs Hart wrote: "You taught her that for every chemo she has to go through, there will be the opportunity to fly across a lake on a hippogriff. For every time her heart seizes with fear of pain, there will be me chasing it away with a patronus charm.

"Your words built a castle for her to move into when the prognosis got worse.

"Mrs Rowling, cancer threatened to take everything from my daughter, and your books turned out to be the fortress we so desperately needed to hide in."

Mrs Hart added "the most important lesson you have taught us" was "for every child that is taken too early, people will come together, huddling close in a big group, wands held high to light the dark sky with the love they felt".

The letter concluded: "You built Hogwarts as a home for her to return to. And for me."

After being read at the event, which is based on the collection of letters published in Shaun Usher's international best-seller Letters Of Note, Mrs Hart's message was shared widely.

Star Wars actress Daisy Ridley described it as "one of the most beautiful letters I've ever read" in a post on Instagram.