Miranda Hart has said she will be taking time away from work following the death of her dog and “absolute rock” Peggy.

The pet was the subject of Hart’s 2016 book Peggy And Me and frequently appeared on social media, with the comedian referring to her as a “guru”.

Hart wrote on Instagram: “Last week I said goodbye to my beautiful, darling dog Peggy.

“I share because I shared her with you when I wrote Peggy And Me and many of you took her to your hearts. I have always been amused by and grateful for the pictures and gifts she was showered with. She used a blanket a fan gave her in Australia until the end.

“She was recognised more than once in public when friends walked her and once when I was walking her and the woman looked at me said ‘oh my goodness… is that Peggy, I can’t believe it’. And then looked at me again, when I thought I might be showered in a compliment, and she just said suspiciously ‘how come you get to walk her?’

“I proudly and with a lot of internal giggles said ‘I am Peggy’s owner!’

“Fellow dog owners will know the excruciating sadness of losing your loyal, loving best friend.

“The pain mirrors the unique joy, connection, comfort and love they bring. And Peggy was my absolute rock and source of all those things.

“Their uncompromising, unconditional loving presence is such an incredible gift. Enjoy your dogs as much as you can. They are great teachers.

“I’m using this time to take some time away from work / posting to write and rest and see what the new chapter will be.

“Take very good gentle care of yourselves, please thank you please. Love oo.

“Peggy – you were always by my side and always on my side. I will miss you everyday.”

In 2018 Hart told fans Peggy had been through a tough operation for a foot and bone issue.

She said: “Nothing keeps you in the present moment more than watching a dog in the present moment dealing with something they can’t possibly understand.”