It's one of the best loved rom-coms of the past 20 years, however director P.J. Hogan has revealed that they had to change the ending to My Best Friend's Wedding as test audiences absolutely hated it and wanted Julia Roberts' character "dead".

The day after the 1997 movie was first test screened, a studio executive asked Hogan "How are you going to save this movie?" as it didn't land well with viewers. At all.

In the original script, Roberts' character Julianne failed to derail the wedding of her best friend Michael's (Dermot Mulroney) and his bride-to-be Kimmy (Cameron Diaz) but her chances at love were not lost as she met a new guy played by John Corbett, aka Sex and the City's Aidan, in the final scene.

To say the ending grated with audiences was something of an understatement.

"They wanted her dead", Hogan told Entertainment Weekly. "They just couldn’t understand her motives".

However, the studio still wanted to keep America's sweetheart happy, so they had to come up with an alternative ending for Roberts' character.

"They were very nervous because we were making a Julia Roberts film and they couldn’t have her end up alone and unhappy. So we had to come up with something that pleased the studio, but that was acceptable to the audience", Hogan explained.

Julia Roberts, Rupert Everett, and Dermot Mulroney in My Best Friend's Wedding

Step forward Rupert Everett. His character, Julianne's editor and gay best friend George, was expanded in order to make her character appear more sympathetic.

"Every time Julianne talked to him, she’d explain why she was doing these terrible things; he’s her conscience throughout", Hogan said. Remember this back and forth? 

Michael's chasing Kimmy?  Yes!

You're chasing Michael?  YES!

Who's chasing you... nobody, get it? There's your answer. It's Kimmy.

"Whenever she was being particularly devious I’d have her phone Rupert’s character and he would call her out on it", Hogan said.

Eight months after the film wrapped, Roberts returned to set to shoot the new ending, which sees George arriving at the wedding to dance with her at the reception and utter those immortal lines:

Maybe there won't be marriage, maybe there won't be sex, but.... by God, there'll be dancing!

"It would have been such a downer of an ending if George hadn’t shown up," Hogan said.

"That one scene somehow gave the audience permission to forgive Julianne. Those last five minutes really made the whole movie work." 

In a word: Phew!