Miley Cyrus has given fans a glimpse into her relationship with Beyoncé and how the II ladies worked on their chart-topping duet.

The "Flowers" singer covers the latest issue of W magazine, The Pop Issue, where she opened up more about her friendship with Beyoncé and collaborating on their hit song "II Most Wanted" on Beyoncé's album "Cowboy Carter."

"I wrote that song, like, two and a half years ago. My mom would always go, 'I love that song so much.' So when Beyoncé reached out to me about music, I thought of it right away because it really encompasses our relationship," Cyrus told the magazine.

"I told her, 'We don’t have to get ­country; we are country. We’ve been country. You know, between you being from Texas and me being from Tennessee, so much of us is going to be in this song,'" Cyrus said. "Getting to write a song, not just sing, for Beyoncé was a dream come true."

Cyrus, who called Beyoncé a "big role model" in 2006, explained that she now has a genuine friendship with Queen Bey.

Need a break? Play the USA TODAY Daily Crossword Puzzle.

"Sometimes I forget to talk about things that are a ­normal part of my day-to-day, like texting with Beyoncé" Cyrus said. "I think it’s a really cute part of our relationship, because over the past couple of years I’ve really locked down on my privacy and on what I share with the public. She’s the same way. Part of our relationship is the safety between us."

She added, "The songwriting or the work is just a small part of my relationship with her — or with Dolly, or with anyone. Our personas have a relationship, but then we have a relationship. And I love that."

Cyrus spoke about singing with Beyoncé and Rihanna when she was just 14 for the Stand Up to Cancer benefit concert, saying "they were protective of me." She also recalled the "Ya Ya" singer sending her a jacket that said Miley and jeans from her previous House of Deréon clothing line.

Back in March, Beyoncé graced the cover of W magazine for its first ever digital cover to celebrate her eighth studio album.

Of course, Beyoncé took the internet by storm by releasing her highly anticipated album "Cowboy Carter" on March 29. She has since made history and broken multiple records, and according to the charts, it seems her duet with Cyrus has become a fan favorite.

Disclaimer: The copyright of this article belongs to the original author. Reposting this article is solely for the purpose of information dissemination and does not constitute any investment advice. If there is any infringement, please contact us immediately. We will make corrections or deletions as necessary. Thank you.