Australia moved toward legally recognizing same-sex marriage after the country's ruling party voted Saturday to endorse the issue at its national conference.

"Equality does not diminish the worth of your relationships, it simply recognizes the worth of ours," said openly gay Finance Minister Penny Wong.

The impact of the vote at the centre-left Labor Party's annual conference in Sydney was diluted, however, by a motion by Prime Minister Julia Gillard to allow legislators a "conscience vote" on bills attempting to legalize gay marriage.

That means legislators do not have to toe the party line and can vote according to their personal beliefs.

Gillard's government also holds a wafer-thin majority in Parliament over the conservative Liberal Party — which opposes same-sex marriage — and several Labor members personally oppose gay marriage.

Many commentators say the issue still faces an uphill battle.

5,000 rally for motion

Recent opinion polls have shown a majority of Australians are in favour of allowing same-sex marriage and several states already allow civil unions between gay couples.

Around 5,000 people rallied outside the conference centre in Sydney on Saturday to show their support for the motion, the Australian Broadcasting Corporation reported.

Marriage equality advocates praised the vote as historic but many said they were disappointed with the conscience vote.

Labor backbencher Stephen Jones has said he will move a private member's bill to allow same-sex marriage next year.

And members of the Labor party are reportedly putting pressure on the Liberal Party to also allow its MPs a free vote on the issue.

Same-sex marriage is legal in 10 countries, including Canada, South Africa, Spain and Iceland.

With files from The Associated Press