Pharrell Williams has defended Miley Cyrus, insisting she is just ''growing up.''

The chart-topping producer weighed in on the singer's wild behaviour and believes the 20-year-old should be given the freedom to make her own decisions while she attempts to shed her former child star image.

The 40-year-old star told Details Magazine: ''She's just growing up, and she deserves her time and to do it her way.''

The comments come after the 'We Can't Stop' hitmaker was criticised for ''prostituting'' herself in an open letter written by singer Sinead O'Connor who warned Miley against becoming sexually exploited by the music industry due to her provocative behaviour and skimpy outfit choices.

Meanwhile, Miley praised Pharrell for his contribution to her current album 'Bangerz' and revealed they would often get ''excited'' when making music together.

She added to the magazine: ''Recording in the studio he doesn't ever play it cool. When we make magic together, we could like explode with how excited we are, and I think that's the energy everyone gets from Pharrell.''