Having worked on election campaigns in the UK and Australia, I can attest that the final days are to be endured. Politicians, staff and journalists are all equally fractious and tired.

And if the common metaphor used to be of two bruised prize fighters nearing the final round, throwing punches, exhausted and bloodied, it is now of six scrappers flailing around in a pub brawl. The actual votes could still reveal a different outcome, but this election campaign has surely definitively marked the end of two-party politics in the UK.

And yet, irrespective of this, the true fight between who will be the next leader of the country in two weeks is still between just two men: David Cameron and Ed Miliband. The psephologists will predict this arrangement versus that, but whatever the seats, negotiations and deals which lead to it, only one of these party leaders will be photographed in Downing Street with a beaming grin.

The young Ed

Both Miliband and Cameron worked with senior ministers before entering parliament and each has spent the vast bulk of their professional careers in the Whitehall village. For two years I was fortunate to be resident in that fascinating, alluring, historic, frustrating but always invigorating place. Between 2004 and 2006 I had a desk in the office above the black door of 10 Downing Street, from where I advised Tony Blair on sustainability and climate change.

The last time I saw Ed Miliband was in December 2009, late at night when he was secretary of state for energy and climate change. I was standing to the side of the negotiating floor at the vast Bella Centre, on the outskirts of Copenhagen.

This was long after Gordon Brown, Barack Obama and the other heads of state had left the UN meeting on climate change. Surrounded by the representatives of other key states, Miliband was working through the Copenhagen Accord – the words that would rescue the international climate negotiations from collapse. It was, I thought, typical: Miliband was focused, working hard with others to resolve a problem that would only avert failure rather than register as a triumph, and for which he would get no thanks or plaudits.

John Stillwell/PA

The first time I met him was in his office in the treasury a few days after I had started working at Downing Street in April 2004. He had just returned from a sabbatical at Harvard and in what became typical fashion he reached out to me: wanting to understand the work I was doing and how we might collaborate on an issue of deep concern to both the chancellor and the prime minister.

Despite being a British citizen, spending the previous ten years living and working in Australia made me the exotic outsider. Being a special adviser with an identified responsibility and the job of advising the British prime minister, and yet no personal political ambition, was both a weakness and a strength.

A weakness because I could never be fully part of either the close-knit group which had coalesced around Blair and Brown to make Labour electable again, or the cadre of younger politicians and advisers who were schooled in the ways of New Labour.

A strength because there was no incentive for me to take up time trying to position myself for any role beyond the job I had. Working on the climate change and sustainability agenda for the government was challenging as it was – a far enough position up Disraeli’s greasy pole for me.

The brothers Miliband

When relaxed or waiting for some important piece of advice to be either given the tick, the cross or “see me”, conversation among my colleagues sometimes turned to the purely political question of who might be the next leader of the Labour Party after Gordon Brown.

That Brown would succeed Tony Blair was clear, but he wasn’t, and could not be, the future of the party. That mantle would fall to a member of the younger generation. Rather like a political game of Top Trumps the relative merits of Ed Balls, Yvette Cooper, Douglas Alexander, Ruth Kelly and James Purnell were canvassed and discussed.

EPA/Andy Rain

But the chat always seemed to end with David Miliband being most likely candidate. Here was a politician with a towering intellect and, even prior to his appointment as foreign secretary, the person with the most relevant experience, both in the education portfolio and in helping coordinate policy from the centre of government. His brother wasn’t even discussed. Prior to 2005, Ed Miliband wasn’t even an MP. He was “one of us” in the backroom.

I was never much of an advocate for David. He was clearly a brilliant mind but I always felt it sat on uncertain foundations. In meetings he often came across as imperious and too eager to demonstrate his personal grasp of the issue at hand rather than drawing others in to help resolve it. Too often sentences began in the first person singular followed by reference to the latest report from the Brookings Institute or some conversation with a leading European or American academic or politician.

David seemed more smart than wise. And he would gravitate only to those who he felt were his intellectual equals. The rest were left to feel like the audience. I wasn’t the only one who left those meetings impressed, but unsure quite what was to be done.

My dealings with Ed Miliband were quite different. He seemed a far more intuitive politician. He was always thinking of what people might make of what was being proposed. Is it fair? Is it something the government should be doing? Have all the options been canvassed and is the evidence as compelling as it can be?

Ed was a universally positive, refreshing and useful presence. He took people as he saw them and wouldn’t let the animosities between Blair and Brown – our respective masters – get in the way of good policy. Unlike some of his colleagues he was no tribal acolyte of the chancellor. He was always a consummate mediator and often the vital link between Number 10 and the Treasury.

The key to leadership

The public rarely gets to see a politician exercise one of the key attributes of political leadership: the ability to ask the right questions. Not necessarily the most interesting or challenging ones, but the vital questions that need to be addressed to set a course, account for decisions and build the alliances required to achieve progress.

Ed Miliband’s approach was much like the prime minister’s. Blair was forensic when it came to asking questions. He read every word of every brief and would either annotate the text or call you in to go through each of his queries in turn. This is how he became more secure and built confidence in those around him.

To be effective in parliament or indeed in front of Jeremy Paxman, a leader needs confidence and ego. But to get there they need an even temperament and the ability to understand the questions likely to be asked. All the audience sees is the tip of the iceberg. Beneath the surface is more than two thirds of the mass. Here lies the hours of research, staff work, engaging with the outside world and – if in government – senior public service experts.

After I returned to Australia in 2006, Miliband’s rise was rapid. Continuing to work on the climate problem, I would speak with colleagues in the British public service and outside government. They were almost universally struck by just how effective a minister he was.

I had no experience of working with Ed Miliband as an MP, let alone as the leader of the Labour Party, but my sense from working with him at the centre of the British government for two years is that he has a formidable ability to create loyalties, lead and cut through to the most important aspects of any issue. And that is a far more important skill than eating bacon sandwiches. More than helping in any post election negotiations, it might just serve him as prime minister as well.

You can read The Conversation’s comprehensive coverage of the UK general election here.