Pharrell Williams reached out to Miley Cyrus and offered to produce her new album after watching her deal with the media storm following the bong scandal that threatened to derail her career two years ago.
The former Hannah Montana singer/actress became embroiled in controversy in December, 2010 when video footage of the teen smoking psychoactive plant Salvia, giggling and babbling incoherently, emerged online - just days after she celebrated her 18th birthday.
Anti-drugs campaigners condemned Cyrus for setting a bad example to her young fans, while her own father, Billy Ray Cyrus, admitted he was saddened by the footage and apologized to her followers for her behavior.
The ex-Disney star later admitted she had made a "bad decision" and conceded it was a "mistake" to allow herself to bow to peer pressure, but there was one positive to come from the drama - her collaboration with Williams.
In an interview with Marie Claire magazine, Cyrus reveals she felt invigorated by Williams' approach to music-making and she ended up pouring out her emotions in her new tracks.
She explains, "Pharrell said (after hearing about the bong scandal): 'Don't be offended because this is how I talk, but (I thought), 'That b**ch is actually living. She's not sitting there with her Momager's chain on her door. I want to free that b**ch. I want her out of her cage.'
"I'd never worked like that before. I was talking to him like he was an older brother, and everything I said was going onto the track."
Cyrus admits her new, more personal tunes may not be to everyone's liking, but she isn't worried about sales figures, "I don't need the money. I don't care if I make a dime on this. Let me make a good record. I got in there with Pharrell, and it was magic. Oh, dude, I'm so happy."