Former Australian prime minister Bob Hawke in 2010, at a Labor Party campaign event in Brisbane. (Alan Porritt/AP)

Bob Hawke, a former Australian prime minister who evolved from a mischievous union leader into a gray-haired statesman, spearheading a center-left agenda that made him one of the most popular and transformative leaders in his country’s modern era, died May 16 at his home in Sydney. He was 89.

His wife, Blanche d’Alpuget, announced the death but did not give a cause. Mr. Hawke had been ailing for several months, according to Australian news reports, and died two days before a closely contested national election. In his last public statement, he issued an open letter urging voters to support Labor Party leader Bill Shorten.

Mr. Hawke, who served as prime minister from 1983 to 1991, was widely regarded as the most successful Labor politician in Australian history, and was known for integrating the country into the global economy, forging alliances with Asian nations and strengthening ties with world powers such as the United States.

In a decade dominated by conservative politicians such as Ronald Reagan and Margaret Thatcher, he charted a left-leaning course for Australia, introducing or expanding social welfare programs that included universal health care and the superannuation system, in which employers are required to contribute to retirement plans.

Angering some members of his party, he also pursued a host of economic reforms, reducing tariffs, privatizing assets, floating the Australian dollar and opening the country to foreign banks. For the most part, voters were giddy — his approval rating soared to a record 75 percent, and he became the first Labor prime minister to win four elections in a row.

Fluent in international trade agreements and horse racing alike, Mr. Hawke was already something of a folk hero when he swept into office at age 53. A former president of the Australian Council of Trade Unions, the country’s leading labor group, he was long considered the epitome of the larrikin, an Australian term for a rowdy, mischievous youngster or maverick.

Mr. Hawke in 1985, meeting British Prime Minister Margaret Thatcher. (Dave Caulkin/AP)

“He drinks like a fish, swears like a trooper, works like a demon, performs like a playboy, talks like a truckie — and acts like a politician,” journalist Craig McGregor wrote in a 1977 profile for the National Times, three years before Mr. Hawke was elected to the House of Representatives.

Mr. Hawke said he stopped drinking before becoming prime minister and cut back on Cuban cigars and womanizing. (He once made a tearful appearance on national television to confess to adultery.) Amid high inflation, recession, drought and recurrent industrial strikes, he partnered with his treasurer, Paul Keating, to reshape the country’s economy.

Negotiating between unions and corporations, he forged a landmark 1983 wage-restraint agreement known as the Accord, and six years later helped establish the Asia-Pacific Economic Cooperation forum, a pro-trade group for nations across the Pacific Rim.

The organization was part of a broader pivot toward international engagement. Breaking with a precedent in which Australia more or less isolated itself from foreign affairs, Mr. Hawke met with Reagan in Washington, cultivated a friendship with Israel, organized anti-apartheid sanctions against South Africa, and expanded visa programs for Chinese nationals in the aftermath of the 1989 Tiananmen Square massacre.

“We are a richer, more diverse, better country now because we have been a country of large immigration,” he declared in 1990, condemning racist rhetoric amid a national debate over immigration.

Mr. Hawke also backed new environmental protections, halting a proposed dam in the Tasmanian wilderness and leading an international effort to prohibit mining in Antarctica, and he presided over the introduction of a new national anthem, “Advance Australia Fair,” in place of “God Save the Queen.”

By 1990, however, Australia had fallen into an economic downturn that spiraled into its worst recession since the Depression. Mr. Hawke faced mounting pressure from Keating, his cabinet colleague turned political rival, who ousted him from Labor’s leadership in 1991 and succeeded him in office. Asked in an outgoing news conference how he would like to be remembered as prime minister, Mr. Hawke doubled down on his everybloke reputation.

“I hope they still will think of me as the Bob Hawke that they got to know,” he said. “The larrikin trade union leader who perhaps had sufficient common sense and intelligence to tone down his larrikinism to some extent and behave in a way that a prime minister should if he’s going to be a proper representative of his people, but who, in the end, is essentially a dinky-di Australian.”

Robert James Lee Hawke was born in Bordertown, South Australia, on Dec. 9, 1929. His mother was a schoolteacher and his father was a Congregational minister; an uncle served as the Labor premier, or governor, of Western Australia, where Mr. Hawke grew up.

Mr. Hawke attended the selective Perth Modern School with Billy Snedden, who led the center-right Liberal Party in the early 1970s, and said he lacked direction and ambition until age 17, when he suffered a motorcycle crash that nearly killed him. He went on to study at the University of Western Australia, where he received bachelor’s degrees in law and economics, and attended Oxford University on a Rhodes Scholarship. While there, he set a world record by downing a yard of beer — roughly 1½ liters — in 11 seconds.

“In a political sense, it was one of the big advantages that I got out of my time at Oxford,” Mr. Hawke later said. “It endeared me to a large section of the Australian voting population that I had a world beer drinking record.”

In 1956, Mr. Hawke returned to Australia and married Hazel Masterson. They had four children (one died in infancy) and divorced in 1995. Later that year, he married d’Alpuget, his biographer. Complete information on survivors was not immediately available.

Mr. Hawke studied for a doctorate at Australian National University before leaving to join the Australian Council of Trade Unions as a research officer and lawyer. In 1970 he became the union’s president, and he won a string of labor victories before being elected to the House in 1980, representing a section of Melbourne’s northern suburbs.

He supplanted longtime Labor leader Bill Hayden the next year and was elected prime minister within a month, ending an eight-year run of Liberal control under Malcolm Fraser. (The prime minister is a member of the House of Representatives, where term lengths vary but last no more than three years.)

Mr. Hawke served as a corporate adviser and director after leaving office, and he was a fixture at Australian cricket matches and other sporting events, where he sometimes delighted crowds by downing a beer in seconds, as he had in his college days.

Sports had long appealed to him and endeared him to Australians soon after he was elected prime minister. When Australia won the America’s Cup yacht race in 1983, snapping a 132-year American winning streak, Mr. Hawke celebrated alongside his champagne-soaked countrymen. “Any boss who sacks anyone for not turning up today is a bum,” he told a national television audience. “It’s Australia’s cup now.”