Opinion | Will Australia Rise Above Xenophobia?

MELBOURNE, Australia — As Australia faces the global virus of xenophobia, the country’s early history provides a warning of the social and economic costs of isolation.

Australia was one of the richest settlements on earth when it was a British colony with open borders in the 19th century. But it retreated when it became an independent nation in 1901, and it endured almost half a century of economic stagnation before it opened its doors again to mass immigration after World War II.

The leaders of the main political parties continue to support an expansive immigration program and profess to abhor racism. But this cherished bipartisanship is in danger of fracturing.

A set of controversies involving race threaten to make the next federal election — due later this year or early next year — the most divisive in a generation. The conservative government of Prime Minister Malcolm Turnbull has been exploiting racial disharmony in a bid to shore up its older, whiter electoral base.

But the political benefits for the conservatives of a racially charged campaign are not as clear-cut as they once were. The Labor Party would probably win an election fought along racial lines because of demographic trends: More than half the population is made up of immigrants, their children and Indigenous Australians. The younger, more ethnically diverse electorate tends to lean toward Labor.

So Labor has a strong incentive to make the coming campaign season an explicit contest between diversity and nativism. And in facing down the conservatives on race, Labor has the opportunity to reaffirm Australia’s position as a global model for openness.

Immigration has been responsible for more than half the nation’s population growth between 1996 and 2016. Last year, immigrants accounted for 63 percent of growth. This boom prompted the first of three big controversies over race.

Immigrants are being blamed by conservatives, and even some Labor members, for rising property prices and congestion in the big cities. Some leading conservative figures have been pushing for a deep cut to the immigration program. While Mr. Turnbull has so far resisted their calls, he has thrown red meat to his base: The government is cracking down on temporary work visas to “put Australian workers first” and making it harder for immigrants to claim Australian citizenship.

The danger is that these measures will alienate the skilled immigrants already here and encourage potential immigrants to bypass Australia and settle in more welcoming nations like Canada and New Zealand.

When it comes to refugees, the second issue touching on race, the government is seeking to exploit divisions on the Labor side between the pragmatists in Parliament who want to wait until after the election to close the Pacific Island detention camps and the party members who want to bring the refugees home immediately.

The third controversy is not of Australia’s making but could damage social cohesion if it is mishandled. The whole country is wary of Beijing’s attempt to influence political and academic debate in Australia, and politicians are working on bipartisan legislation against foreign interference. The challenge for the main parties is to assure Chinese-Australians that they are not being targeted; on the contrary, political leaders should make clear that these measures are for the benefit of all Australians, including those of Chinese descent. Australia’s argument is with the Communist Party of China, not the Chinese people here.

The Labor Party has a strong incentive to address these racial matters head on. Not only is Australia’s electorate becoming increasingly Asian and Eurasian, but a full attack on the conservatives about race may be the only way for Labor to resolve its own rift on refugee policy. And more important, keeping the doors open to immigrants, especially those who are the most vulnerable, is morally and economically the right thing to do.

The leader of the opposition, Bill Shorten, should challenge Mr. Turnbull to resettle all the refugees who have been stranded on Manus Island and Nauru for the past several years. The refugees remain in limbo as a supposed deterrent to future boat arrivals. But every day they are denied their freedom affects not just their well-being but also Australia’s international reputation.

If Mr. Shorten can unite his own side on refugees with a principled stand, he would then be free to exploit the division within the government on the regular immigration program, which is split between those like Mr. Turnbull who support the current system and those who want to sharply reduce the number of new arrivals.

One strategic goal for Labor would be to win over Chinese-Australian conservatives. The Turnbull government would likely lose power if a handful of cosmopolitan electorates in Sydney and Melbourne, where the Chinese-born cluster, swung to Labor.

The Chinese-Australian community now represents 5 percent of the total population, and three out of four Chinese migrants to Australia live in Sydney and Melbourne. If both Labor and the conservative Liberal Party wish to stand up to Beijing, they need to do it from a position of strength, with the Chinese-Australian community on their side. How to deal with Beijing is the more meaningful debate for the nation’s future.

An election contest for the loyalty of Australia’s immigrant communities more generally would send a powerful message to the rest of the world. Only a principled policy of inclusion at home and an assertion of Australia’s egalitarian values in Asia will ensure the nation’s future prosperity and security. If Mr. Shorten wants to lead a progressive government, he has to first lance the boil of race politics.