Julia Gillard and Barack Obama formed a strong connection in office. This was no coincidence. In many respects, they are surprisingly similar politicians.

Of course, they are not identical. On the occasion of the President's visit to Canberra in 2011, he and the Prime Minister were to deliver a joint press conference live during the commercial television news programs from 6pm. The PM gave a rather breathless performance, even seeming flustered – especially next to the famously cool and scholarly Obama.

In truth though, her breathlessness was literal rather than metaphorical. When the two leaders had walked from the PM's office to the press conference room slightly late, the President had unthinkingly trotted up the stairwell two steps at a time. Julia Gillard, inches shorter and yes, wearing a skirt and heels, found herself racing after him and out of breath, just at the moment before one of the bigger press conferences of her term in office.

Ironically, it was Obama's personal aura of stillness that most impressed those who met him while he was in Canberra, rather than this athleticism. The 'no drama' Obama style in private naturally appealed to the methodical Gillard.

They shared a fair bit else in common too. Bloomberg Business described them as soulmates, noting they were both 'trailblazers — Australia's first female leader, America's first black one — who pledged to change the tone in their capitals. Both are likable politicians who inspire visceral and often inexplicable dislike and face daunting levels of opposition from cynical foes out to derail their every effort. Both confront a news media that has swung from fawning to churlish.' *

As I note in my new book The Gillard Project, the two were the same age, shared a rationalistic and reserved personality, and have a common modernised social democratic outlook. They were both activists in the face of the global recession, and paradoxically, they shared a scepticism about the glamour of international relations.

As was pointed out seemingly every time she ever traveled, Gillard said in an interview during her first overseas trip as Prime Minister in 2010 that 'If I had a choice I'd probably more be in a school watching kids learn to read in Australia.' In 2014 in the New Yorker the President would say, 'I didn't run for office so that I could go around blowing things up.'  So perhaps both were also overly inclined to illustrate a point of difference with their predecessors.

Obama has paid a price for that observation – and for his similarly droll axim 'Don't do stupid stuff' – but I find it interesting that Gillard's statement became seemingly infamous, not just emblematic. In emphasising the importance not only of domestic affairs but specifically of school education, she chose a word picture which could be read as a strikingly feminised one: the school teacher. When Obama is periodically characterised as academic or professorial, quite a different inference is left.

Australian conservatives are fond of arguing that Australia is better served by Republican presidents. Putting aside the disastrous black swan of George W Bush, there's been some logic to the argument that the free traders, internationalists, Asia hands and realists of the old Republican mainstream served Australia's interests well. But Australian public opinion appears to favour Democratic presidents, and in turn the US, and the alliance, seem to rise in popularity during Democratic presidencies. This is not a small advantage in an alliance between democracies.

Perhaps this is because it's been fifty years since a Democratic president led us into a military folly. But it also seems to many observers that the centre of Australian politics is to the left of the American political centre; in turn, it seems to me that moderate Democratic presidents have a strong appeal in Australia while conservative Republicans represent a politics and policy outlook very alien to this country's traditional egalitarian identity and communitarian ideas.

Certainly Gillard and Obama shared policy outlooks. It was said that during that same visit, Obama remarked 'maybe if we get unemployment with a five in front of it, we can have a carbon price too'. They also shared a practice and thought of foreign policy as being increasingly integrated with national identity and domestic policies, rather than a discrete category.

Obama spoke confidently in the Parliament about American democracy, noting that China must change or fail (a speech many confidently argued would damage Australia-China relations, not a contention which seemed persuasive by April 2013). Gillard had spoken in Washington DC earlier the same year of shared reform agendas in 'education, energy and the environment', telling the story of Australia's success in 2009 while adding that 'stimulus and recovery are not enough', connecting her own domestic reform agenda ('human capital, innovation and clean energy') to the challenge of getting the world economy growing after the financial crisis.

By November 2011 the world, the allies and their leaders had moved far from Curtin and Roosevelt's cautious exchanges, but the liberal language of the Four Freedoms and the progressive origins of the alliance in a global war against fascism still sounded intense harmonies with the two nations – and with their two progressive political leaders.

* The quotation marks around this quote were omitted when the piece was first posted. This was an editing error.