Before the first spill, Turnbull's plans were in play.

This is a five-part serialised feature that will be published November 29 to December 3.

Challenging times: He's all pose and no pluck, they said of Turnbull. In the end they did the work for him. An iron law of leadership challenges is that a candidate plotting to unseat the leader cannot be trusted to do his, or her, own numbers. The aspirant is too hopeful, and the colleagues too artful. The challenger will make a hopelessly optimistic count of his support base. In the February spill motion against Tony Abbott, Malcolm Turnbull was content to let a small group of backbenchers do the numbers. They kept him informed as he quietly weighed his options. But in the approach to his September challenge, Turnbull threw the rule out and became his own numbers man. He kept the central list of names – the yes, no and maybe votes - and trusted himself to do the count. The small huddles of pro-Turnbull backbench zealots had their lists, too, but Turnbull trusted his own. It was a sign of his gathering confidence and hardening determination. Abbott and the only adviser he still listened to, Peta Credlin, had persuaded themselves that Turnbull would never challenge. They sometimes described him in private as "another Peter Costello", all pose and no pluck, they decided. They were fascinated by him and frequently speculated about his manoeuvres. The daily meeting of the government's leadership group, the inner 10 or 12 who set tactics and strategy, was often diverted by their musings on what Turnbull was up to. They were confident that he was untrustworthy, that he was leaking against Abbott. He was out refining his stump speech, his now-familiar ode to optimism: "There's never been a more exciting time to be alive," he told the Brisbane Press Club a month after the February spill. But he had failed to step forward in the moment of the spill; his periodic tirades delivered in the privacy of the cabinet room seemed like passing storms, sound and fury signifying nothing; and he was not visibly assembling numbers. Abbott and Credlin "were simply delusional", says a member of his cabinet, now a member of Turnbull's. "They didn't want to see what everyone else could see." What Abbott and Credlin didn't see was that Turnbull didn't need to sign up supporters. The Abbott-Credlin duumvirate was driving them into his arms.

Turnbull commonly told colleagues that Abbott's capacity for self-delusion, his lack of comprehension for the feelings of those around him, showed that he was "basically a psychopath". Turnbull had been described by an earlier Liberal leader, Brendan Nelson, as suffering "narcissistic personality disorder". Now it seemed the narcissist was calling the psychopath crazy. Abbott and treasurer Joe Hockey shared a fear of reliving the experience of the Malcolm Fraser administration, a government of missed opportunities. But wasn't their worst fear realised? Some opportunities were firmly seized. The boats were stopped. Despite all the sceptics and despite the harshness, the Abbott government policy was so irrefutably successful that Labor, too, adopted it. It is now bipartisan national policy. Scott Morrison assembled the policy from opposition, in secret, with two others in a purely informal coalition of the can-do. He worked with a retired general, the take-charge Jim Molan, and the gung-ho Liberal frontbencher and former army captain Stuart Robert. The secret to their success was that they didn't need to invent any new policy mechanisms. Paul Keating introduced mandatory detention, John Howard turned back boats, Kevin Rudd introduced the policy that no one arriving by boat would ever be allowed to resettle in Australia. The Morrison group decided that the key to success was in how to bring it all together in a decisive central command. There were too many agencies involved – the Immigration Department, the Navy, Customs, Border Protection, ASIS. The magic ingredient was not the "what" but the "how", they decided. Create a new agency? No, all the institutional power of Canberra's existing authorities would unify to resist. They needed to mobilise a whole-of-government solution with the existing agencies. They decided to co-opt the resources of all the agencies to the project, but under a unified command with a strong leader. They lit upon the idea of a serving general, reporting to Morrison. Defence assigned General Angus Campbell, to Morrison's delight. There were policy extras. Strict, sometimes over-strict, secrecy was designed to give the people smugglers zero intelligence. Unsinkable orange life boats were added to stop asylum seekers from sinking their boats to force a rescue at sea. It was ugly but effective. Morrison's success earned him the admiration of his colleagues and set him on the path to the treasurer's post.

Another standout success of the Abbott term was Australia's hyper-effectiveness under Andrew Robb in pushing forward with market opening, at home and abroad. Robb had asked Abbott for the Treasury portfolio. But when given Trade and Investment he didn't sulk. He was relentless, even during the months he was suffering painful shingles. He saw his job not just as advancing trade but as something much bigger: "I saw from opposition that fiscal policy and monetary policy" – budget policy and interest rates – "have lost traction as debt piles up and interest rates go towards zero. So where do you go if they're not working and the mining boom is coming to an end?" Robb's trade and investment agenda became the de facto economic reform tools of the Abbott era. He sealed trade deals with all three of Australia's biggest trading partners – South Korea, Japan and China - in staccato. These were adopted by Labor, too. Robb then negotiated the Trans-Pacific Partnership. He's still hoping to clinch a trade deal with India by the end of the year. With these and other, lesser policy successes in mind, Abbott has declared himself content with his record: "If I'd been knocked over by a bus on the morning of the coup, I would have gone to the Pearly Gates and given an upbeat assessment. I don't believe we could have done much more or much better than we did. There was an enormous amount of solid achievement." There were limits and problems but Abbott puts the full blame on factors beyond his control: "I think it was a very successful government in spite of a feckless Senate, an irresponsible Labor Party, a poisonous media culture and well organised white-anting," he tells Fairfax Media. The independent and minor party crossbenchers in the Senate have a different version. They say the problem was Abbott's government presenting them with harsh and unfair measures which they could not accept, and Abbott's unwillingness to negotiate. Abbott rejects this, too: "I'm not sure what more I could have done [with the Senate crossbenchers]''. One of them, Nick Xenophon, said Abbott's comments made him "feel genuinely sad because he doesn't get it – his budget policies were built on a non-existent foundation of broken promises, and no community support".

The government's fortunes improved somewhat after the February spill. The budget in May, with generous benefits for small business and no new harsh measures, was given credit. The government had been behind by 45 per cent to 55 per cent in an average of all the major polls at the time of the February crisis, according to polling expert John Stirton; it recovered to 48 per cent to 52 over the next five months. It was still behind, but Abbott and Credlin were convinced that they could win an election from this position. That's consistent with the experience of earlier governments, including Howard's. Abbott's token gestures to party sentiment briefly mollified some. "Everyone really hoped it was going to work after the first spill," a junior minister says. "We all made an effort." But they realised that the gestures – Credlin's disappearance from public view, regular meetings of his full ministry, dinners with MPs – were empty. Credlin remained in her job and Hockey in his. It was business as usual. Abbott and Credlin's confidence surged, and the misjudgments soon started to flow unchecked again. Abbott's attempt to ambush his cabinet on citizenship laws. His successful ambush of the entire party with his same-sex marriage gambit. His forlorn effort to defend Bronwyn Bishop's expensive tastes in transport. His distracting "culture war" with the ABC over its Q&A show. And in the meantime, a damaged Hockey, invariably drawn by cartoonists with an exploded cigar in his mouth, unable to carry an economic program, inflicted further self-harm with his response to people worried about home affordability - "get a good job". The revival, just a couple of months old, died. The polls reverted. The government was behind 46 to 54 on Stirton's poll average, implying a savage loss of perhaps 30 of the government's 90 seats in the House. The survivors would be going to the opposition benches. "If he had any decency he'd resign," an exasperated Turnbull said repeatedly to his supporters in Abbott's final weeks. He had decided to challenge, yet still hoped the prize would fall to him effortlessly. So Turnbull and most of the party were already agitated by the time the final provocation arrived.

In February, the lightning bolt that galvanised the spill was Abbott's decision to knight Prince Philip. In September it was a story in The Daily Telegraph musing on Abbott's plans for a cabinet reshuffle to remove "dead wood". Peta Credlin was widely assumed to be behind the story. Turnbull described it to colleagues as a "Credlin special". Abbott and Credlin told colleagues they had no hand in it. By then it didn't really matter. MPs commonly believed that she leaked against colleagues who were out of favour. "It created a cycle of leak and counter-leak," says a cabinet minister who himself sometimes leaked against Abbott. How can a single newspaper piece be so infuriating as to bring on a challenge to a prime minister? A backbencher explains: "It ticked all the boxes, all the things he'd promised to address, nothing had changed. "One, the prime minister's office is an island, it doesn't consult the party. Two, if you step out of line, Credlin will attack you through the media. Three, it showed the utter lack of any political judgment. Four, it was just the latest in a long line of endless f… ups." Any hope of even the possibility of recovery under Abbott evaporated in the despair and anger of a party pushed beyond any point of tolerance. The Daily Telegraph story appeared on the Friday. That very day, Turnbull received the pledges that he was waiting for: "The numbers are coming to me, I've got the numbers," he announced to Julie Bishop that day by phone. His backbench zealots had been recruiting for him, but in the end Abbott and Credlin did the vital work for him. To the end, he didn't need to bargain or plead for votes. In earlier months, Robb had considered standing against Turnbull in the event of a challenge. That would have given the party's conservative faction an alternative that some would have found attractive. It would have complicated Turnbull's task. But by the time the critical point arrived, Robb had decided not to stand. The government was in crisis and only Turnbull could lead it out, he concluded. But the Turnbull campaign team didn't know that. To Robb's surprise, two backbenchers told him that he didn't look well and should take a few days off. No one had ever shown such concern for his health, he remarked to a colleague. It was the Friday before the coup. He later discovered that, a day before that, Christopher Pyne had suggested Credlin give Robb the same message. The Turnbull team was trying to head Robb off, but this only became clear in retrospect.

By Monday, as Parliament resumed, a number of senior ministers could see the crisis building. Small groups of backbenchers were talking to ministers, asking them to join the coup. But Abbott's cabinet colleagues knew that the leader was unwitting. Despite media reports and warnings from colleagues, he'd persuaded himself he was safe. They feared an impasse and sought a breakthrough. On Tony Abbott's final day as prime minister, three of his cabinet ministers discussed the idea of going to see him to tell him that his time was at an end. With Abbott in Adelaide announcing funding for the Northern Connector road project, he brushed aside reporters' questions on the leadership as "insider gossip" and "Canberra games". The gossip was actually useful intelligence; he had played the Canberra games hard, and he was on the cusp of losing. Pyne and George Brandis separately phoned Julie Bishop about going together to see the leader. Bishop decided it had reached the critical point. It would be humiliating for a delegation to call on Abbott. She decided to go alone. She arranged to meet him the minute he returned from Adelaide. When it finally came, Abbott was genuinely startled. Even after Bishop walked into his office at 11.55am and said: "As your deputy, this is a conversation I never wanted to have, but I have to tell you you've lost the backing of the majority of the party room and the majority of the cabinet." Even then Abbott had to ask her whether she thought Turnbull was really going to challenge. Turnbull would take advantage while he had the numbers, she said. "This is really happening," she told him. Shocked and angry, he later blamed Morrison and Bishop for failing to warn him. But has any prime minister ever been so starkly warned? After the February spill, his party put him on a six-month probation and told him to get rid of Credlin and his treasurer, Hockey, as a condition of keeping his job. Abbott ignored the conditions and wished away the consequences. In the event, his final plea to his colleagues revealed the central failure of his prime ministership. In his televised remarks, he asked them not to remove a sitting prime minister because "we are not Labor". A Liberal backbencher, Dan Tehan, had earlier asked Abbott to "give us something to fight for". The idea captured Abbott and he repeated it to others. But he failed to give them anything to fight for. "We are not Labor" is not a compelling cause for a government facing defeat. After defeating him by 54 votes to 44, Turnbull sent Abbott a text message. No one understands better than I do how you are feeling, wrote Turnbull, an allusion to the fact that Abbott had torn him down in 2009. The subtext: Live by the sword, die by the sword. Turnbull concluded by sending his and Lucy Turnbull's love to Abbott and his wife, Margie. Good of you to say so, replied Abbott to his new leader. He also included a barb. Luckily, he told Turnbull, I am surrounded by people who love and respect me regardless of wealth and position. We should catch up some day, Abbott wrote, but better let some water go under the bridge.