In 2007 China overtook Japan as Australia's largest trading partner. Australia has been selling raw materials to China as fast as it can dig them up and load them onto ships, generating jobs and revenue. More recently, demand from China has cushioned Australia from the worst effects of the global economic downturn. Just last week state-owned PetroChina signed up to buy around $41 billion of liquefied natural gas--the biggest resources deal in Australian history.

No surprise then that Aussies developed something of a crush on China. The 2005 Lowy Institute Poll of Australians' views on foreign policy found that 69 percent had "positive feelings" towards China (while 58 percent had "positive feelings" for the United States). A year earlier former foreign minister Alexander Downer sent a tremor through U.S. defense circles when, visiting Beijing, he seemed to question whether Australia's alliance obligations would apply in the event of a U.S.-China conflict over Taiwan. There was palpable concern in Washington that a moonstruck Australia had succumbed to Beijing's "smile diplomacy" and was drifting into China's arms. The advent in Australia of a Mandarin-speaking prime minister must have looked like consummation of these fears.

Suddenly, however, this budding romance is in trouble. A massive resources grab by Chinese government-owned giant Chinalco ended in mutual recriminations and the arrest of mining giant Rio Tinto's senior Australian executive in China on unspecified and still unexplained espionage charges. Chinese officials brushed off requests for consular access and dismissed Prime Minister Kevin Rudd's public statements of concern as "noise." Beijing reacted sharply to the Rudd government's defense blueprint, which questioned the intent behind China's rapid military modernization and committed, quite reasonably, to a build-up of Australia's maritime capabilities.

More recently, Chinese diplomats have tried to intimidate organizers into canceling appearances by Uighur exile Rebiya Kadeer at an international film festival in Melbourne and Australia's National Press Club in Canberra. Mysteriously, untraced hackers managed to take down the film festival's website. Beijing's diplomats were less successful. Both events went ahead, with vastly more media attention than they would have received otherwise. Beijing retaliated by canceling a high-level visit and sanctioning a wave of criticism of Australia in China's state-controlled media.

Previous ham-fisted attempts by Beijing to constrain freedom of speech in Australia have backfired badly. In 2007, Chinese diplomats in Canberra were warned that Australians took a dim view of being lectured by another country--any country--about who their elected leaders could and couldn't see. They were specifically advised against publicly calling on former prime minister John Howard to boycott a meeting with the Dalai Lama. Sure enough, the Chinese foreign ministry did just that, guaranteeing high-profile meetings took place not only with Howard but also with then opposition leader Rudd. During 2008, Chinese diplomats organized massive, threatening counterdemonstrations in support of Beijing's indefensible policies in Tibet, triggering serious unease in the wider Australian community and concern inside government security agencies.

China-boosters like to laud the Middle Kingdom's soft power, contrasting it with barely disguised glee with America's supposed loss of "moral authority" and fading influence. But what China is exercising vis-à-vis Australia looks much more like old-fashioned authoritarian hard power.

And it's clear that Aussies don't much like Beijing's thuggery. Lowy Institute polling in 2008 showed that while Australians continue to acknowledge China's importance to the Australian economy, they are increasingly aware of, and concerned about, the darker side of China's rise. Nearly 90 percent of Australians believed that China will become the leading power in Asia; almost 60 percent of these people expressed discomfort with the prospect. Just over half of all Australians agreed that Australia should join with other countries to limit China's influence.

So is this a passing lovers' tiff or something more serious?

Many in Australia's self-appointed foreign policy, academic, and business elites--often themselves direct beneficiaries of the relationship--would like to kiss and make up, whatever the price. They tend to malign the public for its supposed naïveté and ignorance about the world. China is changing, they argue. Sure it's not a democracy, but it's no longer really a Communist dictatorship. Its political leaders are more interested in stoking economic growth at home so they can cling to power than they are in outward expansion. So the Australian public should put aside their scruples about human rights and the rule of law in China and let the foreign policy mandarins get on with the grand national project of building a special relationship with Beijing.

For this crowd, Australian business people need to get with the program, too. Granted, China's companies aren't quite like ours, and we tend not to lock up their negotiators when they visit. But if they want to pay less than the market price for our commodities, surely we need to take a long-term view and cut them some slack? Pre-emptive capitulation to China is widespread. Australian business people and commentators alike often declare that Australia will have to get used to Beijing setting the terms of the relationship. The Rudd government hasn't helped, sending haphazard and conflicting signals that have confused and frustrated China and the business community.

Putting in place a durable framework for the relationship is becoming more important and--as recent tensions grow--more urgent. Australia's relationship with China is undergoing profound structural change. It is becoming much more complicated and much more difficult to manage. An increasingly powerful and assertive China is feeling its oats. Previously in Australia's history, our political, strategic, and economic interests have been aligned. Initially Britain was both our security provider and our major economic partner before it was supplanted by the United States during the Second World War. For several decades Japan--democratic, developed, and a U.S. ally--took over. Now Australia's most important trading partner is an increasingly open strategic competitor, particularly in our region, to our major ally.

This development will place Australia's international policy settings under increasing strain. A trade surplus in Australia's favor, a Westminster political system, and the absence of any equivalent to the Taiwan Relations Act make this balancing act easier for Australian governments than it is for American administrations. But there are parallels: As Australia's economy becomes more integrated with China's, relations with Beijing are set to become much more sensitive and politically contested.

Ironically, this is likely to strengthen Australia's alliance with the United States and with its other most important regional partners, democratic Japan, India, and Indonesia. After a period during which strategic judgments about China's rise tended to drift apart, Canberra's assessments of Beijing's rapid military modernization program--particularly its acquisition of blue-water naval capabilities--are reconverging with Washington's. Australia signed a historic joint security declaration with Japan in 2007 and is moving to strengthen its strategic ties with India and Indonesia. The Rudd government has committed to acquiring cruise missiles, a larger, more capable submarine fleet, and larger surface ships.

If he is serious, Rudd will follow these welcome steps by participating fully in U.S.-led missile defense cooperation in Asia, pressing ahead with stronger defense links with Japan, and lifting the Labor government's counter productive and hypocritical ban on uranium exports to India, paving the way for a bilateral security agreement with New Delhi. Rudd will recognize that China has an insatiable demand for strategic raw materials that Australia has in abundance--iron ore, uranium, coal, and gas--giving Australia leverage, too. The fact that this week's liquefied natural gas deal came at a time when diplomatic relations are strained only serves to underline that China needs Australia at least as much as Australia needs China.

Rudd will also need to stop sending mixed messages and signal clearly to Beijing, the Australian people, and the international community that while Australia values its economic ties with China and is committed to building the strongest possible economic relationship, it will not compromise on its core national interests--including the U.S. alliance and our strategic partnerships with Asia's democracies--or its values.

Andrew Shearer is director of studies and a senior research fellow at Australia's Lowy Institute for International Policy. He was previously national security adviser to Prime Minister John Howard.