Malcolm Turnbull was forced to inflict an ugly process on Australia on marriage equality, one he himself succinctly demolished before his elevation to the prime ministership, one that has enabled homophobes to inflict yet more pain on LGBTI Australians, one that has seen Australia at its worst. But it’s delivered the win that Turnbull desperately needed. One that will allow him to remove the discrimination in Australia’s marriage law that targets LGBTI people.

The legislative process for doing so has begun already. Yesterday, Liberal senator Dean Smith gave notice of a marriage equality bill to be introduced in the Senate this afternoon and, if agreed, debated tomorrow. It is backed by Labor, the Greens, NXT, two other Liberals and Derryn Hinch. The draft bill from the Institute of Public Affairs’ James Paterson, which has been savaged across the political spectrum, hasn’t even been the subject of a notice motion, and can’t even be introduced this week.

The contest will now be between the push from marriage equality advocates on all sides, and the government’s senior ministers, to get the issue settled when the House of Representatives returns the week after next, and the deadenders who will want to gum up the process with a torrent of amendments for Smith’s bill. On current form, they may struggle to be able to bring on Paterson’s bill for debate, so the fight will be over despite the effort by deadenders to widen provisions enshrining discrimination as far as possible, hoping for support from senior conservatives like Scott Morrison and Peter Dutton, who’ve already flagged they think Smith’s bill doesn’t do enough. This will be the territory on which the deadenders will circle the wagons.

For all that, Turnbull is still on track to be the PM who delivered marriage equality over the resolute and often deceitful opposition of Tony Abbott and other deadenders (remember how the last parliament was to be “the last term in which the Coalition party room can be bound” on the issue?) Moreover, his greatest enemy has been utterly repudiated — Tony Abbott, who waded into the campaign as a means to undermine Turnbull, set the benchmark of 40% as a “moral victory” for the No vote, and that clearly failed, with a No vote of just 38%. Seventy-five per cent of Abbott’s own electorate voted Yes. Sixty-four per cent of Tasmanians voted Yes, repudiating Abbott ally Eric Abetz; Kevin Andrews’ seat voted 57% Yes, repudiating another reactionary. Moreover, Abbott is held responsible by some within the No camp for providing a distracting and divisive tone to the campaign (who can forget the effort to concoct a scandal over the NRL grand final?), which is why he was sent out of the country for part of the final stages of the campaign.

On this issue, at least, Turnbull has dealt his internal enemies a ferocious blow and left them humiliated in the eyes of their own voters. And for a beleaguered prime minister who may not be leader for too much longer, the finish line for what may be the one significant achievement of his time in office is within sight