They’re putting you through the fire,” I remarked to the prime minister on the first day of winter, 2010.

“Is my arse alight?” he replied.

It turns out it was.

A sitting prime minister was about to be thrown out of office. Not by the public, but by his own party. Democracy was having a coughing fit.

I had been told that Julia Gillard was not loyal, though I didn’t believe it. I was aware of Labor backbenchers and backroom boys “backgrounding” the media against Rudd. The Australian had been savaging Rudd almost daily; clearly something had gone down with its editor, Chris Mitchell, in the few years since Mitchell had asked Rudd to be his son’s godfather. Just as evidently, certain members of the NSW right were in bed with News Limited newspapers. Even my own friendship with the prime minister had been put forward for ridicule. One newspaper rang to ask me if I’d helped him write his health policy, which had me staring in disbelief at my Stuyvesant Red. Another contacted me several times to ask, even more ludicrously, whether Rudd kept a mistress. As if he’d have had time for that. My only offence was to have written a children’s book with Rudd, proceeds of which had gone to charity. It seemed that no good deed goes unpunished, at least not in politics.

But I didn’t seriously countenance that Rudd could or would be removed. He was too tough, too smart, too resilient.

I had formed a strong and rather unlikely friendship with Rudd years before. I liked and admired him, and still do. We are very different people, but for some reason we have always got on extremely well. Sure, it’s odd when your friend becomes prime minister, but it’s even odder when he suddenly no longer is.

The first indication of trouble on the night of knives, 23 June 2010, arrived via SMS from a Rudd staffer only a few minutes before the story became public on ABC News. Just two words lit up: “It’s over.”

I didn’t believe it. To be sure, during the previous month or two Rudd had not been his ebullient, slightly scandalous self. His mood had been sombre and serious. While sombre and serious is expected of a prime minister, it’s not what I was used to. Dark forces were whispering, both in the press, and within the party. I figured this was something all political leaders had to face. There was always going to be a downswing from the kind of popularity he’d enjoyed. Now the backlash was here – so what? In my naivety, I occasionally sent Rudd supportive quotes by the likes of Sun Tzu and Churchill, including, “If you’re going through hell, keep going.” I had no idea there were various levels of hell and how rapidly Rudd was going through each of them.

That initial SMS sent my heart rate up, but I was busy. I was in Sydney, working late in an office, writing songs for a children’s album. One song had the lyric ‘When girls and boys fight / It’s not very nice’. At the same time, being a politics tragic, I stayed alert to any developments in Canberra with one eye on the TV, Twitter, the internet and telephone. As the ABC broke the story of a looming challenge, I was furiously texting my friends ‘in the know’. I reasoned Rudd was shoring up support. “It’s not real, is it?” I wrote more than once. “It’s not only real. It’s over. He’s gone.” This from someone who knew.

I jumped in the car and drove. I broke a number of laws. There was not another car on the road; if you think it wasn’t a dark and stormy night, you’re wrong. My car was pummelled by fists of rain, not unlike King Lear on the heath in his final days. Shakespeare came to mind often in the hours that followed.

I arrived at Parliament House, or rather the ghost of Parliament House, at 10 pm. It was grey and empty. Through Twitter I already knew the hordes were in the restaurants and bars of Manuka and Kingston. Someone tweeted that Bill Shorten was dining with Kate Ellis, “doing the numbers”. I texted Ellis to let her know it maybe wasn’t a good look. I realised I had friends on both sides of what was coming. The Labor Party was adept at finding new ways to test loyalties and break hearts – they had no problem eating their own – but here it was, right before me.

I stepped out of the car into that very Canberra chill. The car park was empty. I’ve always thought of the ‘Big House’ as an upside-down salad bowl, or even an upright one, filled with car keys. That night, the swinging conspiracy of the quite successful had all gone home. Some of them alone.

I called Rudd. His phone was off. His phone was never off. I called two of his closest staff, his chief of staff Alister Jordan and press secretary Lachlan Harris. First phone: off. Second phone: “I can’t talk. See you in the morning.” I had to get into Parliament House and I didn’t know how. Then I bumped into Tony Burke, a Labor minister and a friend.

“What’s happened?” I asked.

“It’s done.”

“Why?”

“You can ask for my loyalty once, you can’t ask twice.”

“What do you mean?”

“AJ [Alister Jordan] came round, asking if I was loyal. He asked all of us.”

I could already feel the narrative kicking in. I could already feel the half-truths. I could already feel my loyalties torn. This was political reality; how dirty the game was.

“OK. Can you sign me in?”

“Sure. Look after him [Rudd].”

Burke’s sorrow was palpable. This game hurt him, too.

I entered the House in a daze; I had raced toward action and there was none. The House was beautiful, empty and still. No sound, no fury. Nothing.

I went straight to the prime minister’s office. I knew every part of that office. Every lamp was turned off. I looked at the discrete plaque that read ‘Kevin Rudd. Prime Minister’. All of the ministerial wing was darkened, but for the light coming from Wayne Swan’s office. It seeped betrayal. Instinctively, I started filming everything in front of me. I wandered from Swan’s office to Gillard’s office and back to Rudd’s. I filmed clocks and corridors and plaques. I stopped for cigarettes. I had all the time in the world to reflect on a man whose time had run out.

As I left the building, the parliamentary guard pulled me up.

“Are you Rhys Muldoon?”

“Yes.”

“Phone call for you.”

It wasn’t a phone call. It was the Australian Federal Police.

“Were you filming?”

I showed every photo and video I had taken, and deleted them all, as asked. It occurred to me, as I sent the one of the prime minister’s plaque into ‘trash’, that deletion might well be the theme of the moment. Someone had simply, unthinkingly, pressed ‘delete’. One day they’d go looking for him, wondering what they’d done, ruing their quick fingers, hoping to locate him in their trash folder.

I got in my car and headed to Kingston, for no other reason than habit. It’s where the action is. I went looking for a journalist friend at the Holy Grail, but couldn’t find him. I visited a former Rudd staffer, who now worked for Swan. We watched the Socceroos play Serbia, mutely avoiding the topic before us. The Socceroos won, yet were knocked out of the World Cup. A bit like Rudd, really. It was 4.30 am. The new day, the day of the beheading, was upon us.

*

I arrived early to a very different Parliament House. The place was electric. People were everywhere. The car keys were back in the bowl. In the prime minister’s office, those present were intensely solemn, like spectators at a car accident. Rudd, Senator John Faulkner, Anthony Albanese, Jordan and Harris were speaking quietly and deliberately about how to proceed. These were funeral arrangements.

History has a quiet voice. I walked around the corner to Gillard’s office. The mood there, too, was serious – seriously busy. It was filled with men I’d never seen before. Not one. Standing there I received an SMS that Gillard and Swan had been “given the nod” by the big three mining companies – Xstrata, Rio Tinto, BHP Billiton – beforehand, letting it be known that the ads attacking the government for its proposed tax on miners’ super profits would be pulled. Could this be true? Might the party backroom boys really have sought tacit approval from the miners for a change at the top to seek an end to the damaging impasse over Rudd’s tax (which was really Swan’s tax), and thus help win over wavering MPs? Could anyone seriously doubt that such a deal was beyond the Labor Party? If true, this was a coup of historic expense. The compromise that Gillard worked out in the ensuing days would cost Australian taxpayers $110 billion over 10 years.

But in the meantime, formalities had to be, well, formalised. Rudd went one way, Gillard another. Gillard and Swan smiled achingly, while the Rudd camp looked like grim realists. It was important to avoid puddles on the way to the gallows. Gillard was going to win unopposed because Rudd had been instructed (and realised) it was the tidiest way to do things. But tidiness isn’t easy. I was in awe of the politeness of it all.

There is a sweetness as well as a toughness to the press pack in Canberra that is often misunderstood. The men and women of the press are some of the smartest, most decent, but also slightly damaged and vulnerable people you will ever meet. Their cynicism got a little jolt that day. Some cried. Still, there was work to be done. What had just happened had to make sense. Rudd had had it coming. He deserved it. Out with the old, in with the new. You could feel the airbrush firing into life.

Outside Rudd’s office it was, apart from a number of notable exceptions, a case of ‘Ding-dong! The witch is dead’, as everyone scrambled to embrace the new power structure. I visited a number of ministers. Some were shocked, some were happy. Some were angry, some had known this was coming for quite some time. Back inside Rudd’s office, the team looked like it had just lost the Grand Final. Heads were in hands. There were few words. Rudd’s immediate family, Thérèse, Jessica, Nicholas and Marcus, were there, not hiding their emotions. There was whisky (Johnnie Walker Black Label), and the occasional drop of dark humour. Said Marcus Rudd, “I’m heading back to the Lodge to stockpile all of the food and cans of Coke for the inevitable nuclear winter.”

Thérèse wept on my shoulder. “Why would they do this? Why?” I had no answer then, but I think it was: Because they could. Rudd had no faction. He’d been popularly elected, and the politician’s lot, in the main, is to end up popularly rejected, but the party had denied him this. The natural rhythm of parliament had been upset.

Rudd’s staff were packing boxes. Some had to ask how to assemble a box; it was as if they needed instructions on how to be sacked. Other staffers lay on the ground watching Sky News and muttered expletives whenever Gillard came on the screen. The women tended to be a lot more vocal than the men. No one believed that this coup was as spontaneous as had been made out. People here, including Rudd, suspected a very long betrayal.

It was time for Rudd’s final speech, outside his office. He wondered aloud whether to head out alone or not. Then he turned to his family: “You’ve been here from the start; I want you here at the end.” Up to forty of his staff entered the quadrangle as one, and stood to the side while he spoke. I stood not far from Rudd and filmed his speech on my phone. Replaying it recently, I could hear the sniffles of the press. And then the applause, as Rudd left the stage.

The staff repaired to his office to resume dismantling it. The clean-out was as swift as a theatre ‘bump out’, and just as brutal. In the theatre, the moment a show closes, the stage is stripped of everything without a fleeting thought for the worlds and lives and moments it has just borne. It always hurts a little bit. Similarly, a political troupe is a strange, typically dysfunctional family that comes together to achieve something, breaks up, and eventually disperses to find new dysfunctional families. The young, and mostly brilliant, parliamentary staffers in Rudd’s office didn’t know this yet.

During those hours, Rudd spent much time alone. Thérèse went in occasionally, but essentially Rudd was alone with his thoughts. Everything felt beyond words at that time. I suggested that maybe some graffiti might help. Or starting a small fire with the furniture. But Rudd couldn’t help himself. Though in shock, he never ceased analysing and assessing. All of his mistakes, his victories, his grand ambitions, including for a reinvention of the ALP, had come to this. Swan’s betrayal, while difficult, didn’t shock him quite so much. The nerdy thinker and the studious footy player were never a great fit. It was difficult for me to hear some of Rudd’s assessments, as I’d come to like Wayne Swan. But Swan could play hard; there was a fraction too much faction, as it were. Julia Gillard, on the other hand, was the real shock to Rudd. He utterly misread her. He trusted her, even liked her. He thought she liked him. He still struggles to process what happened. Why did she leave his circle?

His removal had been so abrupt, so perplexingly quick. How cleverly might it have been orchestrated? Step one: make Rudd dump the emissions trading scheme (ETS). Step two: dump Rudd for dumping the ETS. Had that been the tactic all along? The Greens were major players, of course; they had denied Rudd his ETS, only to agree to a weaker version under Gillard. They could have had cake, and now they had crumbs. There were machinations everywhere you looked, and Rudd couldn’t stop himself from looking. Such thoughts wouldn’t leave him, and they still don’t.

At the close of the day, our party, if that’s what it was, hit the Lodge. I had been to the Lodge and Kirribilli House a number of times, and they’re not the palaces our tabloid media make them out to be. Both houses, while surrounded by beauty, are surprisingly humble. That night, though, the place shed any vestige of formality. Rudd had always surrounded himself with youth, for its energy and brainpower, and the joint was jumping with staff, ex-staff, loyal friends and one ministerial colleague, Maxine McKew. Alister Jordan (who I think was taking things harder than anyone), Lachlan Harris and the hugely smart Andrew Charlton gave it one last hurrah, as did Jess Rudd, dressed in Byron Bay chic. It was the end of the world as we knew it and we were determined to feel fine.

Rudd, standing halfway down the main staircase, launched into a moving, self-deprecating yet still serious speech in which he admitted, to appreciative chuckles, that he was, at times, a rather demanding boss. He spoke of his faith in his staff, in his family, in the country and, rather bravely, in the ALP. He wrapped up his speech by adding, “If any of you, any of you, need help securing a job, come and speak to me right now. I’ve met a few people since I’ve had this job.” He then sat on the steps as a steady stream of staffers came to chat, vent and grieve. Mostly Rudd did the consoling, but it was clear his wound was still very fresh.

Shortly, the party erupted like an Irish wake. Marcus Rudd was our DJ. There was drinking and dancing and even semi-nudity, as we made our way to the Lodge swimming pool. Most of us ended up in there. Then Harris and I spotted Rudd. He’d had his baptism of fire; someone had to put him out. Amid much cheering, Rudd landed in the clear, blue-lit water, fully clothed.

Earlier, I’d sat with him for about 30 minutes to hear exactly how that final meeting with Julia Gillard, with the unimpeachable John Faulkner as their silent witness, had unfolded. His staff spoke to me, too. Apparently Gillard had kept him talking for two hours or so while her forces, or at least the forces behind her, were counting numbers. Senator Faulkner came in and out. Mark Arbib, just as present, was invisible. As a compromise, Rudd had asked Gillard to wait at least until October before requesting a ballot for the leadership. She had agreed, and the last thing she had said to Rudd, as she left his office, was: “I just want you to know, I’m not going to challenge you.” In an antechamber outside Rudd’s office, she made a call. It was brief. She turned on her heel, walked back into Rudd’s office and said. “Kevin, I’m challenging for the leadership.”