But in just three years the Whitlam government instituted sweeping changes that transformed Australian society as the baby boomer generation came of age.

In a rapid program of reform it called “the program”, the Whitlam government created Australia’s national health insurance scheme, Medibank; abolished university fees; introduced state aid to independent schools and needs-based school funding; returned traditional lands in the Northern Territory to the Gurindji people; drafted (although did not enact) the first commonwealth lands right act; established diplomatic relations with China, withdrew the remaining Australian troops from Vietnam; introduced no-fault divorce laws; passed the Racial Discrimination Act; blocked moves to allow oil drilling on the Great Barrier Reef; introduced environmental protection legislation; and removed God Save the Queen as the national anthem.

But the Whitlam government’s economic record is more controversial. It came to power at the time of the first oil shock and failed to contain wages inflation. In 1975 it was embroiled in what became known as the “loans affair” when the minister for minerals and energy, Rex Connor, sought to borrow money for resource projects, outside normal treasurer processes, from Arab financiers using a middleman called Tirath Khemlani. No money was borrowed but the scandal deeply damaged the government.

Whitlam won a double dissolution election in 1974, with a reduced majority. But from October to November 1975 the parliament was deadlocked, with the opposition using its numbers in the Senate to refuse to pass the budget. When Whitlam visited Kerr to call for a half Senate election, Kerr instead withdrew his commission as prime minister and replaced him with the Liberal leader Malcolm Fraser.

Whitlam lost the election to Fraser after the national upheaval of the dismissal. He stood down as Labor leader and retired from politics in 1978.

A towering figure at 1.94m, with a deep resonant voice and an eloquent turn of phrase, Whitlam inspired a generation of progressive politicians and was widely referred to by just his first name. His is remembered for some of the most famous quotes in Australian politics, including while standing on the steps of the old parliament house after news of his dismissal. He said: “Well may we say ‘God save the Queen’ because nothing will save the governor general.”

He was a graduate of Knox Grammar and Canberra Grammar and joined the airforce after university, before studying law and being admitted to the bar. He married Margaret Dovey in 1942; they had four children.

He won the western Sydney seat of Werriwa in 1952 and was elected leader of the Labor party in 1967, succeeding Arthur Calwell.

After leaving politics he worked as Australia’s ambassador to Unesco, accepted several visiting professorships and, along with Margaret, received life membership of the Labor party in 2007.

Margaret died in 2012. Whitlam, by then using a wheelchair, had moved into an aged-care facility in 2010. He described her as “the love of my life”.