Miley Cyrus has shared a song, ‘Mary Jane 5EVR’, dedicated to her beloved dog Mary Jane who sadly passed away.

The singer mourned the death of her dog in a series of heartfelt Instagram Story posts on Thursday, January 7th, calling Mary Jane her “best friend.”

“MJ was diagnosed with cancer over a year ago…. & since then multiple types and tumors,” Cyrus revealed. “I was told it’d be an uncertain amount of time until she’s gone. Advised to spend every second savoring anything new. I had been for 10 years.”

She continued, “In life it is easy to take things for granted. To let little miracles pass you by without moments of gratitude. To be oblivious when the rays of heaven shine down onto you. But when it came to my ANGEL Mary Jane… never once did I forget the gift I had been given.”

The new dedicated track leaked a couple weeks ago in an unfinished form but it was actually first written a few years ago. Now, Cyrus has shared the final version on her Instagram. She wrote an emotional post to accompany it: “I wrote this song in Malibu years ago on a piano in a house that no longer exists. About my dog Mary Jane who is also gone now.

A lot has changed over time. Mostly me. Music is my medicine. This song revolves around loss & heartache. Which I am currently experiencing after Mary Jane’s passing. MJ was a true queen. She wore her grace, dignity & kindness like a crown. She will never be forgotten and will forever be missed. To know her is to love her. It has been my honor being her mom and best friend.”

She’s not the first popstar to let their art be influenced by their pets. Lorde delayed her much-anticipated new album after the sudden death of her dog Pearl. Cyrus herself of course previously wrote about her pet fish in the song ‘Pablow the Blowfish’ (from her 2015 album with The Flaming Lips, Miley Cyrus & Her Dead Petz).