The first citizens I encountered when I left the cold steel and glass national Parliament late last night were a study in contrasts. The well-refreshed, well-dressed guests at the minerals dinner in the Great Hall rolled out jokes about redheads, security officers talked of the human toll of politics while the taxi driver summed it up with “you just can’t trust them”.

That was the fear inside the Prime Minister’s office as a luminous winter day in the national capital turned darker with intrigue. An always calm office was yesterday on yet another leadership code red.

The day started with a reverse gotcha for the media when independent MP Tony Windsor announced he was retiring from politics. He is a well-liked wily old fox and had kept his intentions well guarded and unheeded by observers obsessed with the latest Rudd circus. The PM spoke of her affection and respect and that “millions will be sorry to see him depart the Parliament at the coming election and I will  be one of them”.

Windsor and another retiring independent, Rob Oakeshott, voted with the PM on Tony Abbott’s division that disrupted question time. The great negotiators Gillard and  Windsor will in the end leave the Parliament on the same day, today.

But yesterday the fight to govern and lead was still on. The parliament was distracted but still doing the business, passing legislation. Gillard saw “five patient years of work” succeed as she watched the education reform legislation pass the Senate around 1pm. At 2pm she was on her feet in question time saluting the achievement, but beyond the loyalists on the front bench few were listening. All eyes were on Bill Shorten, who arrived in the chamber then disappeared. As question time started there was no Shorten and no Kevin Rudd.

At 3.20pm Tony Abbott gets his division. As they cross the chamber to vote no the Labor caucus briefly feels the chill of the opposition benches. The government wins by one vote. Prime Minister Gillard has not lost a vote on the floor of the House.

By 4pm ministers are coming and going from the PM’s office. Emails come through on who is “sticking with Julia”. What’s noticeably different this time from the March on/off leadership contest is the absence of Shorten in the inner circle.

At 4.17pm Sky News calls it on. Gillard announces the leadership ballot for 7pm. She echoes Princess Diana’s lament, “there were three of us in this marriage”: “I have been in contest with the Leader of the Opposition and another who wants to be PM.”

By 4.45pm parliamentary secretary for the arts Michael Danby announces “Rudd would make a great ambassador to China”.

“By 9.30 she was back in the office, holding a glass of red wine but not sipping it. She saluted her staff and invited them to her home.”

The television monitors that daub every office and coffee corner of the parliament are nearly in meltdown as both “camps” mess with each other’s minds over who is voting for who.

5.15pm: late again, Rudd finally makes a statement. The Australian people want me …”

It’s really on. Someone in the PM’s office turns on gentle music.

At 6pm news services around the country bewilder Australians with another ballot.

Shorten made his announcement — a dramatic switch at Rudd — at 6.38pm. Staff groan in the PM’s office. A young female voice calls “shame” at the TV screen; another quietly delivers his assessment of the new reality with the usual Australian expletive.

A senator leaves the office. How will it go? “Badly.” Another caucus supporter, drawn and sombre, leaves the back way

Advisers congregate in their offices. I look at the man who worked on the Gonski education plan solid for three years of his life. There is nothing to say.

Politics uses people as fuel. By 7pm, as the caucus filed in for the vote that would take down Australia’s first female prime minister, many were running on empty.

At 7.55pm the caucus returning officer confirms a narrow return 57/45 to Rudd. The “mood is sombre”.

When the PM’s office is called to a meeting at 8pm a terrible silence fell. At 8.30 someone turns on the State of Origin game.

Gillard emerged with her concession speech — gracious — in the appropriately named “Blue Room” at 9.18pm. By 9.30 she was back in the office, holding a glass of red wine but not sipping it. She saluted her staff and invited them to her home.

Then her last constitutional duty to visit the Governor-General to resign her commission, the historic letter in her chief of staff’s hand.