Mark Ronson has revealed 'I'm Just Ken' was almost dropped from 'Barbie'.

The 48-year-old producer, who co-wrote the track with Andrew Wyatt, "panicked" when he saw a rough cut of the blockbuster and realised Ryan Gosling's performance of the track "wasn't working" and studio executives even suggested to director Greta Gerwig that she should consider leaving the scene out of the film.

Mark recalled to Sunday Times Culture magazine: “I thought, ‘God, I hope we don’t ruin it.'

“At that first screening the song wasn’t working. I panicked. The humour wasn’t translating and Greta had to fight. The studio asked her how much she really needed it and she said, ‘With every inch of my body.’ And then there was a big swing.”

The song went on to be a huge success and has been nominated for an Oscar, and Mark thinks it has done a lot to "help young boys".

He explained: “Ken is ridiculous. But Greta’s point was that nobody should ever be laughing at a character. We feel their pain, as crazy as that sounds about a guy wearing a white mink and two pairs of sunglasses. I never wanted to write a song for a cheap laugh. You want something to get under people’s skin.

“I know I’ll sound like David Brent, but the song helped young boys. My friend’s eight year old got broken up with and he said, ‘It’s OK, because Ken got broken up with by Barbie.’

"The song tells boys that it’s OK to be runner-up. The internet’s caused a level of isolation in boys and this idea of male camaraderie and sharing your feelings is a nice and unexpected thing to come out of it.”

And both the 'Uptown Funk' hitmaker and his co-writer can understand why the song appealed to so many people.

Mark said: “It had ripples everywhere. But especially in England, where there is a lineage for this kind of song. “It is the 1970s, the book Elton and Bernie wrote. A piano ballad that is sort of proggy and a bit 1980s too. A bit 'Handbags and Gladrags'. Or it could be Robbie Williams.”

Andrew added: “It’s unbridled. 'Like Total Eclipse of the Heart'. These are songs in which someone takes their emotions so seriously that they feel comfortable taking up a huge amount of space to make sure everyone knows they are upset.”