It's easy to forget how big a gamble Australian Prime Minister Malcolm Turnbull took with this election.
He called the election early by pulling a double dissolution trigger, in order to clean out the Senate and its recalcitrant crossbench.
This necessitated the exhausting eight-week campaign, which has ended in a knife-edge result.
But it turns out whoever manages to form government may have an even more difficult upper house than the previous one.
On early numbers, the Senate crossbench will swell from eight in the last Parliament to as many as 12 in the new Parliament.
Chief among the troublesome crossbenchers the government will have to deal with now is Pauline Hanson.
The former fish-and-chip shop owner is on track to win one or two Queensland Senate seats for the One Nation party, after picking up 6.5 per cent of the primary vote nationally.
Meanwhile, independent Nick Xenophon will hold a lot of power in the new upper house.
Senator Xenophon was on track on Saturday night to pick up three South Australian seats in the Senate.
One Nation is also in the running for Senate seats in NSW, Western Australia and Victoria.
Jacqui Lambie, a former Palmer United Party senator, will hold her Tasmanian seat and could bring another candidate with her.
Broadcaster Derryn Hinch declared himself the winner of a Victorian Senate seat, but was still polling short of a quota on official figures.
The Coalition will at best win 34 Senate seats, up one on the previous result, while Labor is unlikely to hold more than 23, down two.
The Greens are on track to take eight seats, down two on the previous result.
If the final result is 34 to the Coalition, and Malcolm Turnbull holds on to power, the Coalition will need five crossbench votes to get its laws through Parliament.
The Senate election was held on new rules that were expected to make it harder for independents and minor parties.
But the double-dissolution election reduced the quota of votes needed to win a seat, counteracting the law changes.