Many were shocked when the collaboration between Paul McCartney, Kanye West and Rihanna came out. It turns out it wasn't a spur-of-the-moment kind of thing.

In an interview with Rolling Stone, the former Beatle said he was eager to work with the “Famous” rapper, but he was firm about their agreement that if they did not like the outcome of their collaboration, nobody should know they worked together.

“I'd heard things like, 'He's got a room full of guys working on riffs, and he walks around going, 'I like that one,'” McCartney said. “It reminded me of Andy Warhol, these artists who use students to paint their backgrounds and things. It's a well-used technique. I thought, 'I don't know how I'm going to fit into that, but let's see. Here goes nothing.'”

The singer-songwriter said he whistled a tune to a music he composed in 1969 for West, and he wasn't sure at first how he and the rapper would use it. He only realized what West had in mind at the time when he heard “All Day,” “Only One” and Rihanna's “FourFiveSeconds.”

McCartney has nothing but good words to say about his collaborator. When asked what he thinks of West, he called the rapper a "great artist."

In an appearance at a “Mastertapes” session at the BBC, the musician also described the rapper as a monster but in a good way. “I love Kanye. People say he's eccentric, which you would have to agree but he is a monster...” McCartney said. “He is a crazy guy who comes up with great stuff.”

McCartney's collaboration with West sparked his interest in hip-hop. The legendary musician shared that he listens to it a lot for “education.” He said he's seen Jay Z live when the “Spiritual” rapper and West went on tour and even went to a Drake concert.

The admiration is mutual, it appears. West told BBC's Zane Lowe that meeting McCartney was like meeting fashion designer Ralph Lauren for him.

“Meeting Paul McCartney was like meeting Ralph Lauren,” he said. “[They are] the greatest of their fields. Period. Of all time.”

Paul McCartney and Kanye West Paul McCartney recalls the beginnings of his collaboration with Kanye West. Pictured: Paul McCartney and Kanye West attend the Stella McCartney show as part of the Paris Fashion Week Womenswear Fall/Winter 2015/2016 on March 9, 2015 in Paris, France. Photo: Getty Images/Pascal Le Segretain