Before she lost the prime ministership, Julia Gillard had been considering a public reversal of her opposition to gay marriage.
SBS News has been told that although her views were genuinely held, when she took over the prime ministership Ms Gillard had given an undertaking to Joe de Bruyn, secretary of the conservative Labor Right union the Shop Distributive and Allied Industries Association, that she would hold firm against same-sex marriage.
It was not a condition of the union's support – it had already backed her as leader – but Mr de Bruyn wanted an assurance and Ms Gillard gave it.
As the Labor membership gradually shifted its views in favour of gay marriage, the Prime Minister was increasingly at odds.
Her own views had begun to shift too but she held firm to the undertaking – until Labor's primary vote got so low that, according to Labor sources, she believed there was longer any point in upholding it.
In March, American talk-show host Ellen Degeneres and her Australian-born actress partner Portia de Rossi visited Australia and Ms Gillard's office repeatedly requested a meeting between the then Prime Minister and the celebrity couple – a potential picture opportunity and chance to publicly re-position on the contentious issue.
But they couldn't secure the meeting.
In May, Kevin Rudd unexpectedly declared he had changed his views and no longer opposed gay marriage. Friends and colleagues of both prime ministers insist their views were and are genuinely held.
And last night Prime Minister Rudd pledged that a re-elected Labor Government would bring forward legislation to legalise gay marriage within its first 100 days.
Opposition Leader Tony Abbott remains opposed to gay marriage and says his views haven't changed.