Gillard sneaks home
So an election often compared to a national soap opera ended like the finale of a television reality show, with the winner kept a closely-guarded secret until announced live on national television.
There was rich drama right to the very end. Shortly after lunchtime, one of the kingmakers, Bob Katter from north Queensland, announced he'd back the Liberal leader Tony Abbott.
Explaining his decision, he said he was angry with the treatment of his fellow Queenslander Kevin Rudd, who was ousted as Prime Minister by his Labor colleagues on the eve of the election, and believed that Tony Abbott offered, among other things, a better deal for indigenous Australians.
The three amigos, it seemed, had gone their separate ways.
Then, an hour later, came proof of that, when Tony Windsor and Rob Oakeshott appeared together at a press conference in Parliament House to deliver their own verdicts.
Tony Windsor, who represents Tamworth, the country and western capital of Australia, said that the Labor government's plans for a National Broadband Network were crucial, and was one of the reasons why he was backing Julia Gillard.
Then he handed over to Rob Oakeshott, who evoked a line from one of his favourite movies, Highlander: "And then there was one." With that, the member for Lyne launched into a rambling and meandering speech which felt at times like a filibuster. But finally he announced that he, too, would be supporting Julia Gillard, confirming her position as the head of Australia's first minority government since the Second World War.
For Julia Gillard, it was an act of political escapology that saved her government and, presumably, her career.
Australia's first female prime minister was deemed to have "lost" the election campaign. After all, first-term governments are usually expected to be returned for a second term by the Australian people, an unbroken run that goes back to the Great Depression. The post-GFC national economic success story should have worked in her favour.
But, crucially, she won the post-election phase by first cutting a deal with the Greens, then wooing the Tasmanian independent, Andrew Wilkie, all the time building up momentum, and creating the impression that Labor would stand a better chance than the Liberals of forming a stable government.
This helped her win over two of the three amigos, despite the fact that Tony Windsor and Rob Oakeshott represent fairly conservative-minded, regional constituencies, where polls showed that electors favoured Mr Abbott as PM.
Last week, Tony Abbott was describing his Liberal-led coalition as the "government-in-waiting". Perhaps that displayed precisely the kind of hubris which was off-putting to independents who all said they wanted a new style of politics. Similarly, the repeated claims of winning more seats and more votes than his Labor opponents might have had an adverse effect.
In defeat, he delivered a gracious enough speech which said that Australia's longest election had finally come to an end. For many Australians, whatever their political persuasion, that alone, I suspect, will be met with some relief.
Over the next few days, we can ponder the chances for stable government, and ask whether this result brings Australia's reform era, which has stretched back over 30 years, has come to an end. But for now, the simplest questions: did two of the three amigos do the right thing?