Gillard had allowed Labor MPs a conscience vote on the issue, giving them the freedom to vote according to their personal views, rather than along party lines. The Opposition was solidly against the bill.
Labor frontbencher Anthony Albanese, who voted for the reform, said despite the bill’s failure the figures were encouraging.
“Just a few years ago there wouldn’t have been the support of anything like 42 votes on the floor of the national parliament for a marriage equality bill,” he told reporters.
“All the figures show that there is majority community support on this issue… and I think at some future time, parliament will catch up with the community opinion.”
The vote ends several days of debate on the bill, during which one senator was forced to resign after making homophobic remarks.