Legislation to phase out live sheep exports within five years and end the trade to the Middle East during the northern summer has passed the Senate.
The private bill, co-sponsored by the Greens along with independents Derryn Hinch and Tim Storer, cleared the upper house 31 votes to 28 on Monday.
However, to come into effect, the ban would need to get through the House of Representatives.
But Liberal MPs Sarah Henderson and Sussan Ley's recent elevation to the frontbench has forced them to abandon a pledge to cross the floor on the issue.
Earlier, crossbench senator David Leyonhjelm accused animal welfare advocates of racism for wanting to end live sheep exports to the Middle East.
"Calls to ban live exports are wrong from every perspective. They are racist, imperialist, arrogant and anti-animal welfare," Senator Leyonhjelm told parliament.
Senator Leyonhjelm, who used to work as a vet and agribusiness consultant, said the debate had nothing to do with animal welfare.
"The people who buy our sheep are brown and those who don't want to sell them our sheep look down on them," he said.
"Just imagine if these brown people tried to stop us eating ham at Christmas by refusing to sell us pigs."
He said Australian live exporters had better animal welfare standards than any other country, arguing overall standards would be lifted by sending more sheep overseas.
Greens senator Mehreen Faruqi urged her colleagues to answer thousands of messages from Australians to end the "trade in misery".
"The live export trade is simply and totally incompatible with animal welfare," Senator Faruqi said.
"This is truly a historic day that issues of animal welfare have made it to the floor of the Senate. Today it is time to ban live exports."