Bob Hawke, who has died aged 89, went from being a popular trade union leader to become the Australian Labor party’s most successful prime minister, winning four election victories from 1983 to 1991. He energised his country and his party by ushering in a decade of significant economic and social reform.

By dint of his charismatic personality, powers of persuasion and, for a Labor figure, unusually strong relationships with both business and unions, Hawke forged a powerful consensus that defined his leadership style. With his natural diplomacy, he navigated Australia into a wider world by building alliances, particularly with Asia, and he modernised the economy, integrating it into overseas markets through reducing tariff protection and floating the Australian dollar.

His government also oversaw stronger environmental controls, overruling Tasmania’s plans to build a controversial dam in the wilderness. He led the widespread reform of education and training and even advocated a treaty – still unrealised – with Indigenous Australia.

Hawke’s success in the polls enabled him to shrug off criticisms from the party grassroots that by moving to the right and embracing competition he had compromised Labor’s traditional ideals. He said: “Socialist is not a word I would use to describe myself.” It was his understanding of what the Australian people wanted that led to his record re-election. He was eventually undone in 1991 when challenged by Paul Keating, Labor treasurer since 1983, after reneging on a deal to step down in the latter’s favour.

The legacy of Hawke and Keating was that privatisation and deregulation opened up the economy and set it on a strong course.

The reasons for Hawke’s fall from popular grace are still contested. In 2015 he claimed he had been dumped by Labor MPs because he had attacked the “innate prejudice” of some cabinet colleagues in his steps towards reconciliation with Indigenous Australians. But Hawke was not helped by a faltering economy at the end of the 1980s. Restructuring the trade unions and economic reforms had created 2m new jobs but also led to a recession, high interest rates and the highest unemployment since the 1930s.

Supremely self-confident, Hawke had a well-known love of drink and women. His second wife and biographer, Blanche d’Alpuget, said in 2015 that the more intrusive media of today would have rendered him unelectable. In his memoirs, Hawke speculated that the world record he had set for downing the equivalent of a yard of ale, while a Rhodes scholar at Oxford, probably endeared him to more voters than any other single act.

The convivial Hawke was a great celebrator and sports fan. He oversaw the contentious bicentenary of the arrival of the convict fleet in 1988, the introduction in 1984 of Advance Australia Fair as the Australian national anthem, replacing God Save the Queen, and the opening of the new parliament house in Canberra by the Queen. He was perhaps best loved for a seemingly boozy assertion on television early in his first term, after Australia had won the America’s Cup yachting trophy, that any boss who did not give staff the day off was “a bum”.

His style was summed up by one ministerial colleague who found him gregarious, confident and without pretensions as he shared his trade union colleagues’ love of the simple things in life, such as football, horses and beer. “Hawke as prime minister was corporatist and bureaucratic by instinct and presidential in style,” said the former health minister Neal Blewett. “He was a supreme optimist, with an unquenchable faith in his ability to negotiate a way through intractable problems ... He was also a complete pragmatist, with only a few passions and less ideology.”

Bob Hawke as prime minister at the races, playing host to the Queen at the Queen Elizabeth Stakes, Sydney, 1988. Photograph: The Sydney Morning Herald/Fairfax Media via Getty

For such a consummate and seasoned performer, Hawke’s entry to federal parliament came comparatively late, at the age of 50. He became prime minister after only two years in Canberra and had never served as a minister.

But Hawke had authority with the people as well as their support. Graduating from Oxford with a thesis on wage-fixing in Australia, he joined the Australian Council of Trade Unions in 1958 and after a decade as president, 1970-80, decided to enter politics. He was elected as Labor MP in October 1980 for the Melbourne seat of Wills. He had already served as president of the Australian Labor party from 1973 to 1978 and was one of the best-known and most admired public figures in the country.

His political views were passionate though not always predictable. He opposed Australia’s entry into the Vietnam war and campaigned for racial equality in South Africa. At the same time he was a strong supporter of both the US-Australian alliance and the state of Israel.

In 1979, the strain of his workload and his alcoholism, which he admitted in a TV interview, led to his physical collapse. His honesty and subsequent rehabilitation in his early years as an MP was rewarded with even higher ratings in the opinion polls, overshadowing both the Liberal prime minister, Malcolm Fraser, and the Labor opposition leader, Bill Hayden.

Hawke sought to depose Hayden as leader, and succeeded, after a long and bruising fight, in March 1983. The same day, Fraser, who was not yet aware of the change, had called a sudden election, hoping to face Hayden instead of the popular Hawke. It was a spectacular miscalculation.

A dejected Hayden described the public feeling against Fraser as such that “a drover’s dog could lead the Labor party to victory”. He might have been right, but Hawke romped home on a landslide – with Labor taking 75 of the 125 seats – to become prime minister, fulfilling an ambition and prediction he had made as a 15-year-old.

One of his first moves was to call a summit of politicians, unions and employer groups, to forge a lasting accord around economic policy and deliver the kind of micro-economic reforms that would define his term.

He used his authority, at first cautiously, to reverse the traditional party reliance on tariffs to protect industry and jobs from overseas competition. Those working in textiles and motor vehicles were most affected.

Despite his background as a union leader, Hawke believed, with Keating, that the only way to make the structural changes necessary to competently manage the ailing economy was to work closely with both business and the workers, and to stress the mutual benefits of consensus.

His government started deregulating the financial system by exposing it to competition, as had long been recommended but not implemented. First came the floating of the Australian dollar on the world market, rather than tying its value to any standard, then the removal of foreign exchange-rate controls and the entry of foreign banks into Australia. The process accelerated the integration of the economy into the world and reshaped Australia’s relationships with Asia, Europe and the US. Hawke was instrumental in forming Apec, the Asia-Pacific Economic forum, in 1989.

Other reforms with lasting implications were the privatisation of state-run industries, including the airline Qantas, and selling off the state-owned Commonwealth Bank. Hawke also increased funding for schools, saw the introduction of the Medicare public health system and provided more targeted financial help for the most disadvantaged.

He was at the helm for Australia’s effective public health campaigns as the response to the Aids epidemic grew into a major political issue. In 1990 he quickly supported the UN with armed forces in the first Iraq war.

His close-knit relationship with the ambitious and confrontational Keating made many of these changes possible, but Hawke’s dream run came to an end as the good economic times began to sour. At a 1987 election campaign launch, Hawke’s overconfidence scored an own goal when he mistakenly proclaimed: “We set ourselves this first goal: by 1990 no Australian child will be living in poverty.” He should have said “... need live in poverty”, and his departure from the prepared speech cost his credibility deeply.

Hawke’s agenda had benefited from the disarray within the divided Liberal party, but he also fought internal battles with Labor’s socialist factions. One of the bitterest was the pilots’ strike in 1989, when the government sided with the airlines to end the damaging industrial action and maintain pay restraint. His close friendship with leading business figures, especially Sir Peter Abeles, who owned one of the airlines involved, hardly endeared him to the left.

As the economy deteriorated, the rivalry between Hawke and Keating increased. In 1988, Hawke had agreed, in secret, to stand down after the 1990 election, but he delayed and reneged on the deal after taking umbrage at a typically provocative speech by Keating.

History repeated itself and, just as Hawke had challenged Hayden 10 years earlier, Keating now contested the leadership. He lost, and left the frontbench. But the damage was done and Hawke, without his powerful treasurer, was seen as bereft of both energy and ideas, and his popularity declined.

After a lacklustre response to the tax-and-spend policies of the new Liberal leader, John Hewson, Hawke was again challenged by Keating in December 1991 and narrowly defeated, in a sure sign that his colleagues had lost faith. In a tearful press conference, Hawke declared he had known the Australian electorate better than anyone and, in retrospect, given the disruption and chaos of the Labor leadership in recent years, few might disagree with him.

Two months after losing the premiership, he resigned his parliamentary seat. In a full life after office, he took up a number of board positions and consultancies which, along with various business ventures, made him a wealthy man. He largely stayed away from politics while Keating was in power but later became more prominent at campaign launches and in the media.

In 2009 he became only the third person, after the former prime minster Gough Whitlam and Whitlam’s wife, Margaret, to be awarded life membership of his party. At the ceremony, the then prime minister, Kevin Rudd, called Hawke “the heart and soul of the Labor party”. He was appointed Companion of the Order of Australia in 1979.

Hawke was born in Bordertown in rural South Australia, son of Clem, a Congregationalist minister, and Edith (nee Lee), known as Ellie, a schoolteacher. His uncle was a Labor premier of Western Australia in the 1950s.

Hawke’s older brother, Neil, died of meningitis when he was young, and his mother’s belief in her surviving son’s abilities and destiny was said to have stoked his resilience. A serious motorbike crash when he was 17 led him to make the most of his talents. After Perth Modern school, he went to the University of Western Australia, where he gained degrees in law and economics, and then took a BLitt at University College, Oxford (1953-56).

In 1956 he married Hazel Masterson, whom he had met as a teenager in the Congregational Youth Fellowship in Perth. She went on to become a popular public figure as the “first lady” and later in her own right as a campaigner for charities and Alzheimer’s research. They divorced in 1995.

Hawke subsequently married d’Alpuget, who had written a biography of him in 1982, and in 2010 produced another volume on his years as prime minister. Later in life, he thanked Keating for throwing him out of office and giving him the “opportunity of marrying the woman with whom I’d fallen in love”.

He is survived by Blanche and three children from his first marriage, Susan, Stephen and Rosslyn. His son Robert died in infancy.

• Robert James Lee Hawke, politician, born 9 December 1929; died 16 May 2019