SYDNEY, Australia — In a recent online discussion, Bill Shorten, the front-runner in the race to be Australia’s next prime minister, left little doubt about where he stood on the politically delicate issue of relations with China — and where the world’s other superpower fit into his calculus.
“If I’m P.M., I welcome the rise of China in the world,” he said in a post on the Chinese social media platform WeChat that was aimed at Australia’s 1.2 million voters of Chinese descent. Mr. Shorten, the leader of the center-left Labor Party, added that he saw China not as a “strategic threat,” but as a “strategic opportunity.”
Those words put him directly at odds with the Trump administration, which has sounded alarms about China’s global ambitions and tactics. But Mr. Shorten, while acknowledging that Australia would always be an ally of the United States, declared that it was time for his nation “to stand on its own feet and think for itself.”
If Mr. Shorten’s party prevails in Saturday’s election, his embrace of China would represent a significant break from the current conservative Australian government, which has taken a harder line toward Beijing’s growing influence in the country and whose leader, Prime Minister Scott Morrison, is an avowed admirer of President Trump. It could also signify a crack in the united front that the Trump administration is trying to build to check China’s ascent.
For Mr. Shorten, the calculation may be largely about economics. The Labor leader, whose campaign has promised significant spending to bolster public health programs, education and wages, is hoping that improved relations with China, Australia’s biggest trading partner, will keep the economy growing.
Mr. Morrison, whose conservative coalition has narrowed the gap with Mr. Shorten’s Labor Party in polls but is still trailing, has focused his election message on the notion that Labor’s spending plans would send the economy into a recession. That is a frightening prospect to Australians who have known only economic expansion for a generation.
But critics fear that any softening toward China could have much broader ramifications, putting pressure on Australia, for instance, to roll back its clampdown on foreign interference or to keep silent on Chinese human rights abuses.
Mr. Morrison’s warier stance on China was crystallized by remarks he made on Monday when asked about the protracted trade war between Washington and Beijing. He said that he would not pick sides, saying, “You stand by your friends, and you stand by your customers as well.”
The prime minister’s branding of China as a “customer” drew derision from Mr. Shorten, who promised “a bit more sophistication” in handling ties between the countries. For decades, Australia’s economy has been buoyed by the export of natural resources to China, as well as money from Chinese students, tourists and investors.
It’s clear which leader Chinese officials prefer: Social media accounts on WeChat affiliated with the Chinese Communist Party have mocked Mr. Morrison and his government. One account disparaged “a country whose head has been kicked hard by kangaroos” and now wanted to be friends again after a rough patch.
Regardless of who wins the election, Australia will continue to face profound questions over how it balances the economic necessity of cooperating with China with the imperative of protecting its national security interests. Australia is also grappling with its place in the Asia-Pacific region, and the world beyond, as China seeks to expand its economic and military power.
The relationship between the two countries has grown strained in recent years as the Australian government, heeding warnings from national security leaders, has pushed back against Beijing’s attempts to expand its reach within the country’s corporations, universities and national institutions, including Parliament.
The Australian government passed legislation cracking down on foreign interference and secret lobbying on behalf of foreign interests. It also banned the Chinese telecommunications giant Huawei from seeking a contract to install fifth-generation cellular networks in Australia, citing potential threats to national security.
Beijing, in turn, has held up Australian coal and wine imports, and is believed to be behind a cyberattack that infiltrated the networks of the federal Parliament and the three main political parties. (China has dismissed the hacking allegations as a smear campaign.)
China has also bypassed the federal government by signing deals with individual Australian states as part of its gargantuan Belt and Road infrastructure initiative — a global push that the United States and other critics say has lacked transparency and trapped partners in debt.
While it is seen as unlikely that Mr. Shorten, who declined requests for an interview, would reverse the government’s ban on Huawei, his party has indicated that it is open to signing on to the Belt and Road program.
“The fact that Australia is this ally that sits geographically parked in the Asia-Pacific does put it very much in the cross hairs of China’s worldview, particularly on the idea of splintering and weakening the U.S. alliance system,” said Euan Graham, the executive director of La Trobe Asia, a department of La Trobe University in Melbourne.
The Labor Party has traditionally promoted itself as more independent of American foreign policy compared with the conservative coalition, which under Prime Minister John Howard sent Australian troops into Afghanistan and Iraq.
In 2016, Mr. Shorten said that Mr. Trump’s views on some issues were “barking mad.” When asked by a television audience this year how he would reconcile those comments should he meet with Mr. Trump as prime minister, Mr. Shorten said he would deal with Mr. Trump “professionally and politely.”
“But you ask, China or America? In Australia, we’re smart enough to work with all of them to Australia’s long-term interest if we behave in a smart and respectful fashion,” Mr. Shorten told the audience.
Two recent cases involving public figures with ties to Australia may offer a glimpse of how Mr. Shorten would carry out that “respectful” approach.
Mr. Shorten has been reluctant to publicly criticize China over its detention of a Chinese-Australian novelist, Yang Hengjun, saying the case should not be handled through “megaphone diplomacy.” But in the case of Bahraini soccer player Hakeem al-Araibi, who had been granted asylum in Australia, Mr. Shorten’s party directly contacted the authorities in Thailand, where Mr. al-Araibi was being held, to urge his release.
If China senses a friendlier stance from a Labor government, human rights is likely to be one of the areas where it would try to push first, said Giovanni Di Lieto, an international trade law expert at Monash University in Melbourne.
“That will be the real litmus test,” he said.
Mr. Shorten is hoping to shift the debate on the proper approach toward China, which has largely been driven by a sharp divide between the country’s business community and its national security establishment.
Connections to China run deep in the Labor Party, and have been a sore point at times. One of Mr. Shorten’s mentors, former Prime Minister Paul Keating, was until recently the chairman of the advisory board for the China Development Bank, which has poured nearly $200 billion into Belt and Road projects.
And Bob Carr, a former Labor foreign minister, has essentially become one of the Chinese government’s most effective spokesmen, and now heads a university institute dedicated to Chinese-Australian relations.
While the governing coalition has had its share of China-connected scandals as well, the shadows have been especially hard for Labor to cast off.
During one election campaign debate, a coalition government minister began reeling off the names of past Labor politicians who had taken on Chinese-funded roles after leaving politics.