This Is Us star Mandy Moore said “my heart is utterly shattered” following the death of her dog.

The actress, who is pregnant, shared a lengthy Instagram post and revealed rescue dog Joni, named after Joni Mitchell, had died “very unexpectedly”.

The 12-year-old canine had “major surgery” a week ago to remove a mass on her liver, Moore said, and had been recovering well before her sudden death.

Moore, 36, shared pictures of Joni, who she picked up in 2008, and wrote: “My heart is utterly shattered. She was my first love and best friend. Through every twist and turn of life of this past decade and change, she was right there.

“There’s a deep chasm of emptiness that will never be filled but I am so grateful for her sweet nature and the endless connection, compassion, responsibility, patience and devotion that the love of a pet can bring into your orbit.”

Moore, who announced in September she was expecting her first child with singer husband Taylor Goldsmith, described Joni as “the boss and a total mama’s girl”.

She added: “I’m so sad she won’t get the chance to meet her human brother soon but maybe she wasn’t ready to share. Or be a suction cup right by my side every night.

“I will love and miss you forever, my Joni. Thank you for beyond a lifetime of love.”

Moore first found fame as a teenage pop star and has since forged a successful on-screen career, earning plaudits for playing Rebecca Pearson in drama This Is Us.