The Morrison government's union-busting legislation was defeated in the Senate.
One Nation spectacularly opposed it at the final vote despite the government agreeing on all the amendments demanded by the party.
The "ensuring integrity" bill, which would have made it easier to deregister unions and ban officials, was expected to pass on Thursday with Pauline Hanson's support. She and Malcolm Roberts voted against it.