It's been four years since Miley Cyrus debuted her dreamy, beach-inspired song "Malibu." Much has changed for the 28-year-old artist in the years since, but on Tuesday, she remembered her 2017 single and referenced the person she was with at the time, ex-husband Liam Hemsworth.

"Today is the 4 year anniversary of Malibu," Cyrus expressed on Instagram, while also sharing a video of her laying down the vocals of "Malibu."

The Grammy-nominated singer also touched upon her relationship with Hemsworth, which inspired the single. Cyrus was engaged to Hemsworth at the time. The two were married in December 2018 and announced their split in August 2019. Their divorce was finalized in January 2020.

"A song about a place and person that at the time I loved very much," Cyrus wrote. "That love was reciprocated beyond what I could describe here with freedom & escapism."

The pop star concluded on the somber note: "I lost that home along with many others in 2018. Here is a video of me writing it in my home studio."

"Malibu" marked a major departure in Cyrus' sound and image when it was released -- with the singer debuting longer hair and a more wholesome image with white, flowing clothes.

Speaking to Billboard when the sentimental single was released, she revealed the song idea came to her as she was sitting in the back of an Uber while on the way to tape "The Voice" and she wrote the song then and there.