Deputy Prime Minister Julia Gillard and Prime Minister Kevin Rudd in Parliament in June 2010. Credit:Glen McCurtayne The HSU would soon be at the centre of a major national scandal surrounding its own leadership and alleged fraud, but right now, just like the AWU and others, it was busy telling Labor MPs in caucus - the ones they ''owned'' - that it was time to back someone seen to be more sympathetic to their interests. That's how it works, and Rudd never wanted anything to do with it. He'd tried to govern differently, without paying heed to the dominant factions and their union backers. He was never one of the ''tribe'' - and was now paying the price. I knew instinctively that the events of the day wouldn't be going down well in my northern Sydney electorate of Bennelong. A community that had made a significant shift in 2007 wasn't going to be impressed by an execution squad bringing down the leader of the party they'd voted for. They knew Rudd, but who were these other characters whose names were suddenly all over the airwaves as supporters of Gillard? Labor senators like Don Farrell and David Feeney barely registered with the average voter, yet here they were, seemingly at the centre of things. Karl Bitar, the transplanted NSW supremo and national secretary of the party in 2010, was also part of the push against Rudd. And there were two others taking aim at the PM: NSW Senator Mark Arbib and Victorian MP Bill Shorten. Rudd had provided them with an elevator ride to the top, promoting both in record time. What explained their disloyalty? I put in calls to two people: Rudd's chief of staff Alister Jordan and senior minister Anthony Albanese. Both sounded despondent after a night of phoning on behalf of Rudd. From what they said, it seemed clear that the fix was in, that Rudd was the victim of an ambush that had been months in the planning. Earlier in the evening, Albanese had met in Wayne Swan's office with the old Beazley loyalists, among them senior ministers Jenny Macklin, Stephen Smith and Stephen Conroy. All of them knew the price the party had paid in diminished authority for the leadership wars of the opposition years. Rudd had finally delivered them victory and their ministries, yet 2½ years into government they were telling Albanese they were prepared to go along with the plotters for the sake of a ''clean break''. Fed up with them, Albanese told them they would wreck the Labor Party and left. Albanese had also warned Rudd back in May, when the budget was being presented, to watch his back. Albo's antennae had been twitching for months, ever since he'd watched Gillard's cross-border intervention in the NSW preselections the previous November. Altered boundaries had left Reid MP Laurie Ferguson without a seat, but as he was Gillard's chief standard bearer in NSW, the deputy PM made it clear she wanted Ferguson ''looked after''. Gillard prevailed. Chris Hayes, who'd taken over the western Sydney seat of Werriwa from Mark Latham, was blasted out of Werriwa to accommodate Ferguson.

Kevin Rudd arrives for the leadership ballot on June 24, 2010. Credit:Andrew Meares By 11.30pm the phones went quiet. For everyone. Rudd had called a late-night press conference to announce the convening of a special caucus meeting the following morning at 9am: ''It's far better for these things to be done quickly rather than being strung out over a period of time.'' And he added that, if returned as leader, he would be sending a clear message to the right wing of the party that ''we will not be lurching to the right on the issue of asylum seekers''. I took one last call around midnight from someone who worked in the hothouse of Parliament and was close to the action. He reminded me of Gillard's lack of generosity towards me; more than that, her pattern of condescension and the way her office had locked me out of some important policy development. Gillard may have had the words ''social inclusion'' in her title, but the concept never seemed to extend to me. Tales from the Political Trenches, by Maxine McKew. I didn't have to agonise. It wasn't about Gillard, but about loyalty to a prime minister still serving his first term. Rudd had disappointed with his colossal misjudgment in April 2010 when he'd dropped plans for an emissions trading scheme. I'd told him so at the first opportunity and found his response unconvincing. But against that I saw a winning trifecta: a leader who had beaten Howard, who had taken us beyond the shame of our history and made a heartfelt apology to indigenous Australians, and who, in the face of a global financial crisis, had made the timely and bold calls that saved us from recession.

Next morning, it was clear from all the media reporting that this was a minority view, and a small minority at that. I had always felt like an outsider in Parliament House and on this morning never more so. After a brief stop at my own office, I went straight to see Rudd ahead of the caucus showdown. It was just after 8am. I didn't expect a crowd, but it was a shock to see how thin the numbers were as we gathered outside Rudd's suite. Some of the Queenslanders were there: Jon Sullivan, Chris Trevor and Claire Moore. The government whip Roger Price and ACT MP Annette Ellis arrived to provide moral support. But there was only a handful of ministers - Martin Ferguson, John Faulkner, Anthony Albanese, Craig Emerson and Lindsay Tanner - who were openly backing Rudd. Therese Rein wipes a tear during his press conference after he renounced the prime ministership. Credit:Andrew Meares The power had already vanished. When? Last night? Early this morning? Either way, it had evaporated. The end was swift, brutal, almost silent. That was the shock of it. I wanted a few minutes with Rudd, away from the others. Alister Jordan opened the door to the PM's suite and there he was: no longer commanding and full of energy, but shattered and with a face as white as the wall. He was behind the desk writing notes for the caucus meeting that was about to discard him. His wife, Thérèse, and children, Marcus, Jessica and Nicholas, were in the room, all of them red-eyed from crying. It felt like the loneliest place on the planet. Rudd stood up and came around from the desk and I put my arms around him. What do you say to a man who is about to lose the glittering prize of the prime ministership? The best I could manage by way of consolation was a banal, ''This shouldn't be happening.'' Only a few weeks earlier I'd been in this same room having a rare one-on-one over a cup of tea with Rudd. It was at the height of the torrid campaign by the mining companies opposed to the super-profits tax, and by then he was fighting on multiple fronts. At times, he looked friendless. I suggested he needed to reconnect with those things that had worked for him during the campaign in 2007: the focus, the discipline, the purpose. Tell people what you've done. You didn't blink when the GFC hit. You honoured Labor's primary purpose and kept the nation working. And, as tactfully as I could, I also told him to drop the extravagant rhetoric and speak plainly. No more ''revolutions'' or ''greatest moral challenges''. Use verbs. Let them do the work.

Neither of us knew it, but it was too late. Too late for everything. Anthony Albanese was watching the clock. It was close to 9am, the time for the special caucus meeting that was about to anoint a disloyal deputy as Australia's next prime minister. It's quite a trek from the ministerial suites, across King's Hall, and down the corridors to the caucus room. And every ghastly second of this gallows march was followed by television crews. We stiffened our backs and faked our smiles. I was so angry I could have taken someone's head off. How had it come to this? I knew my fate was sealed. I operated on the principle that the whole idea of factional fealty was arcane and had rebuffed an early offer to join the NSW Right. It meant that I set myself apart from the Sussex Street machine, and that had been noted. Mark Arbib and Karl Bitar (dubbed ''Karl Marks'' by some of the Rudd staffers) saw themselves as enforcers. When they kneecapped Rudd they expected caucus to comply, and most did. No one said anything about my non-compliance, but they watched and saw that I stood with Rudd - and that meant I was on my own. It had significant consequences when it came to the 2010 re-election campaign in Bennelong. I looked at the faces of ministers; most were staring straight ahead. Penny Wong was crying. The key protagonists, Gillard and Rudd, were in the front row, a few seats apart and making eye contact with no one. Rudd spoke first. In what was a remarkably dispassionate analysis, he acknowledged that many of the people in the room were fearful because of declining polls, but made the point that this was after two years of spectacular ascendancy. He talked of his deep concern that the federal parliamentary Labor Party was now being subject to the same kind of pressures and practices that prevailed in NSW: the routine and cavalier removal of leaders in an effort to shore up flagging support.

At one point, Rudd's voice appeared to break. Sitting close to the podium that Rudd was gripping for support, Graham Perrett, one of the Queensland MPs who won the Brisbane seat of Moreton on the back of the Rudd surge in 2007, half stood and said, ''Are you right, mate?'' Poor Graham. Was he having second thoughts already? Rudd finished by saying he would not contest the ballot ''because the interests of this party and this government must transcend the interests of any individual in it''. And then it was over. Julia Gillard's leadership was endorsed by caucus and, shortly after, she took the oath of office. Those who'd orchestrated this moment never considered that there might be any kind of backlash against this lightning-fast grab for power. On February 13, 2012, I watched as Julia Gillard traded away a bit more of her credibility in an astonishing interview on Four Corners. No girlish giggles this night, only short sharp responses. Reporter Andrew Fowler had reviewed the events leading to Rudd's removal and was pressing the PM about two points: her knowledge, prior to June 2010, of private party polling that showed adverse results for Rudd, and of the pre-coup preparations being made by Gillard staffers for a victory speech.

Gillard told Four Corners that her staffers ''might have been casting in their mind where circumstances might get to''. She had ''no specific recall'' of private polling and critically, she told Fowler, ''I made a decision to run for prime minister on the day I walked into Kevin Rudd's office and asked him for a ballot.'' Come again? Gillard exercisestop-down control over her office. Her forensic attention to detail sets her apart and her careful planning of every career move is legendary. Politics is her life and she gives it everything she has. A speech I'd prepared for a Sydney Institute presentation in early 2009 was vetted and parsed by three separate Gillard staffers before I was ''allowed'' to deliver it. Nothing happened without Gillard's say-so. Her office was a machine, and an efficient one. It suited her perfectly and advanced her ambitions. Yet Gillard consistently represented herself as a last-minute conscript to the party leadership, as someone who was on the periphery of events right up until the final hours of the showdown against Rudd. The voting public never bought this. The manner of Rudd's removal in June 2010 either bewildered or infuriated Australians. In turn, it fed a sense of illegitimacy about Gillard's tenure and tainted much of what she has attempted since the election of 2010. Gillard's backers, however, have been masterful in the way they have cemented a particular narrative about Rudd's deficiencies as a leader. For a long time, the media reflected this with story after story denigrating Rudd as the worst kind of martinet, someone who had contempt for proper process, and a leader who ignored his ministers. But in the time since the June 2010 coup, a different and more complex story has emerged, one told by ministers and caucus members who feel they were manipulated into a rush of judgment against Rudd. They now see Rudd as the victim of an ambush carried out by a group of political mercenaries. The cost has been catastrophic. Over the past year, I have spent hours talking with former colleagues as they have reviewed in their own minds the events that have proved so devastating for the Labor government. They are by no means myopic when it comes to Rudd. They accept that he can be a deeply polarising figure for many in the broader labour movement. But above all, they see plainly what the electorate sees: the diminished authority that is the direct consequence of a political organisation that casually discards its leaders.

One veteran Labor MP describes it this way: ''This was a very professional hit against Rudd. Don't let anyone tell you any different. This challenge was over before anyone had any time to think about it. It played itself out behind closed doors. Kevin was locked up for five hours. I've been through seven of these bloody things and we were all locked out. They herded everyone in a way that has come back to bite them, and the party. And there was absolutely no justification for it. We were not a bad government. The same people claiming we had lost our way were integral to the direction of the government.'' Julia Gillard, in her first statement after taking over from Rudd, said that ''a good government had lost its way''. What did she mean? It now appears that the first thing that was ''lost'' was Gillard's faith in the government's ability to prosecute the case for an emissions trading scheme, or ETS. She wanted it junked and from the beginning of 2010 never let up in putting forward this point. In early January 2009, Julia Gillard met Kevin Rudd at Kirribilli House. They sat out on the verandah, with its glorious views of Sydney Harbour, and where the ambience can usually be relied on to promote easy talk and resolution. Not on this occasion. Gillard had a blunt message for her prime minister. She told Rudd that under no circumstances would she support the case for an election based on the need for action on climate change. She made reference to the potency of the bush campaign being run by Barnaby Joyce, the maverick Queensland National Party senator. Joyce had his followers, but was Gillard, the government's best performer in Parliament, really rattled by Joyce? Rudd argued his ground but found his deputy immovable, and from this point, the tone of the relationship between leader and deputy started to change. Gillard never relented, and throughout the early months of 2010 continued to pressure Rudd to abandon the ETS. She was backed by Treasurer Wayne Swan. On one occasion, she sent a written message to Rudd that went to the absolutism of her position: she would have nothing to do with an election campaign that re-argued the case for an ETS.

Had she continued in a more traditional way as a supportive deputy, she could have helped the government negotiate its way through a complex policy. But instead, she decided to take on her prime minister on an issue that was central to his credibility, Rudd having dubbed climate change ''the great moral challenge of our generation''. The parliamentary sitting weeks that preceded the June coup had been joyless. Rudd acknowledged to his colleagues the multiple problems for the government: border protection, the school building and insulation programs, the ETS and the mining tax. We were being defined by our opponents and it wasn't flattering. Rudd's personal popularity had taken a dive, with the early June 2010 Nielsen polling showing the PM's approval rating had dropped to 41 per cent. That represented an 18-point movement in the space of two months. The two-party preferred result was even more alarming, coming in at 47-53 in the Coalition's favour. But Newspoll told a better story and suggested the worst was behind us. The poll recorded on the weekend of June 18-20, only days before Rudd was replaced by Gillard, showed the government on a winning two-party preferred margin of 52-48, having moved ahead from the 50-50 two-party preferred result recorded immediately after the budget. And considering all the negatives Rudd was dealing with, he was still preferred as PM by 46 per cent of Australians, compared with 37 per cent who favoured the Coalition's Tony Abbott. On another measure, that of net approval rating, while he was PM, Rudd averaged an incredible figure of plus 34. But a very different picture was being selectively presented to ministers and caucus members. Internal party research purported to show the government's vote in free-fall, with a potential loss of up to 30 seats. Polling in government-held regional NSW marginal seats apparently showed a wipeout. There was one problem with this: it was impossible to reconcile with the published polling. So what explained this disparity? A favoured technique in NSW had been to treat qualitative polling as something more scientific. Instead of listening to the views of voters in order to glean the occasional insight that might inform the prosecution of a message, Bitar and Arbib were fans of an American approach that scored messages to a mathematical formula. Individuals in a focus group, for instance, would be asked to rate a particular statement from one to five. The exercise is repeated across different states and among different kinds of voters. The figures are added up and, hey presto, a collective judgment is delivered! This has left one MP deeply unimpressed: ''The people who engage in these techniques have no serious political compass, and certainly no sense of the history and culture of the party. They have an instrumental approach to the administration of the Labor Party that is almost entirely uninformed by principle.''

In the time that has passed since Rudd's removal as leader, many caucus members have said they were conned. Manipulated. And a principal tool in the enterprise was research commissioned and owned by the Labor Party. As the party's national secretary at the time, Bitar has to take responsibility for this research that was used against the then prime minister. It draws a harsh judgment from many, but in particular from John Faulkner, who told me, ''For a party official to use party research to undermine a serving Labor prime minister - or any party leader for that matter - is quite improper and should never, never be tolerated. Unfortunately, this is just what happened in 2010. I am aware of caucus colleagues who were shown or handed research. I consider this was just sheer bastardry.'' This is a strong statement from Faulkner, who is a trusted figure within the party, and he maintains that trust because he is a man who keeps his counsel. He was a participant, not just a witness, in the long discussions between Rudd and Gillard that took place on the evening of June 23, Rudd's last night as PM. Faulkner has never spoken about the details, and says he never will. But such was Faulkner's disgust and contempt for the way Rudd was undermined and the way that party research has been misused that, on this matter, he was prepared to speak on the record. Rudd's attorney-general, Robert McClelland, was shown ''research'' by Gillard supporter Brendan O'Connor the week before the June 2010 coup. McClelland recalls: ''The fact is, the numbers were rapidly flowing her way and I saw the result as inevitable. Indeed, the rhetoric from her key backers was that we needed to have an overwhelming vote endorsing her. I would also have to acknowledge the subconscious influence that tends to affect caucus members in those circumstances - it's easier to vote according to which way the wind is blowing. It is not a particularly honourable stance and I now regret not taking a stronger position - it wasn't a proud moment all round.'' He now wishes that events had played out very differently in 2010: ''If Kevin had been able to buy himself some time and two weeks earlier had said, 'Look, these self-serving bastards are moving against me and I need some decent people to sandbag around me', I, along with others, would have done it and I reckon the coup would not have happened. As it was, on the night, things moved so quickly.'' McClelland also believes, as do others, that Gillard had planned all along to take over from Rudd in the second term, but with momentum moving away from the government, she decided it was time to hit the accelerator. The party research, which purported to show Gillard's superior leadership qualities, was central to her push for power.

The anti-Rudd leaks had gone on for months: carefully placed stories about the PM's erratic behaviour, his cussedness, profane language, lack of punctuality and log-jams in his office. There was truth in some of this, but the context was never provided. Did any of it amount to a sacking offence? As for the boys from Sussex Street and assorted union bosses reaching for the smelling salts because Rudd's sense of savoir faire was not up to scratch, well, it does stretch credulity. In fact, the charge sheet against Rudd was a convenient fig leaf. Closer to the mark is that Rudd started to tire of Arbib and Bitar's reductionist view of politics - what he saw as the haphazard and shallow advice he was getting on any number of issues: boat people, climate change and how to deal with the fallout from faulty stimulus delivery. It led to a shift in allegiance. Rudd should have set out some very clear rules of engagement from the start and his failure to do so led to misunderstandings on both sides. Rudd eventually decided that most of what he was hearing from Arbib was classic NSW-style lunacy and cut him out. By June, Rudd was not returning Arbib's calls. There is no doubt, too, that people were worried about the coming election; there is nothing quite like the constant, stomach-churning anxiety of a marginal seat member. In a short space of time we had traded away a commanding electoral position. But every election is hard. And unique. Candidates need to get out there and argue their case. And hold their nerve. Strangely, this was not the logic that prevailed. An early decision had been taken by a few aggrieved individuals more interested in their own ambition and power than in working to restore the credibility of the government. This is how one minister summed up what happened: ''The move against Kevin was well organised by a few and the rest were stampeded. The weakest, and most common response, from caucus members was, 'Look, I don't want this to happen, but it is happening, so we need to go for Gillard because that is the way to end it'. That was the big pitch and most bought it.'' I think Kevin Rudd is culpable as well. Where he needed to charm, he scolded. Instead of cultivating loyalists among backbenchers, too often he ignored them. He is a leader who makes few allowances for people who don't share his own obsessions or can't work to his timetable. For all that, an outstanding question for me has always been why a group of senior ministers did not approach Rudd at some point in 2010 and vent their concerns? Was Rudd so intimidating that no one wanted to go near him? In the view of one MP, ''Of course Kevin could be a shit. He was never warm and leaders do need to give out a bit of love. But I can't fault him on access. The fact is he had some weak ministers. I never had any trouble seeing Kevin, but I picked my time. Prime ministers are busy people.'' I do not believe Gillard can be seen as a passive player. She was impatient for the prime ministership and allowed others to create a sense of crisis around Rudd's leadership. She then cut down a prime minister in his first term and pretended it was in the national interest to do so. The voting public saw it for what it was: a brutal grab for power. And they've never forgotten it.

Loading Edited extract from Tales from the Political Trenches by Maxine McKew, published on Monday by MUP (rrp $29.95). Tomorrow - Maxine McKew interview on childhood, politics and life without certainties.