China on Thursday slammed a decision by the United States and Britain to share sensitive nuclear submarine technology with Australia, a move seen as a direct challenge to Beijing and its growing military ambitions.

After President Biden’s announcement on Wednesday of a new defense alliance, to be known as AUKUS, Chinese Foreign Ministry spokesman Zhao Lijian described the agreement as “extremely irresponsible” while Chinese state media warned Australia that it was now an “adversary” of China and should “prepare for the worst.”

At a regular news briefing in Beijing, Zhao said the alliance “seriously undermined regional peace and stability, aggravated the arms race and hurt international nonproliferation efforts.”

He accused the United States and Britain of “double standards” and using nuclear exports as a “tool in their geopolitical games,” as he admonished them to “abandon their outdated Cold War mentality” — a common refrain from ministry spokespeople.

“Otherwise, they will only shoot themselves in the foot,” he added.

While Biden, British Prime Minister Boris Johnson and Australian Prime Minister Scott Morrison did not mention China in their remarks on Wednesday, the pact is widely seen as a response to China’s expanding economic power, military reach and diplomatic influence. China is believed to have six nuclear attack submarines, with plans to increase the fleet in the next decade.

“Beijing will view this as part of the Biden administration’s effort to build coalitions to hem China in and contain its rising power,” said Bonnie Glaser, director of the German Marshall Fund’s Asia program.

The agreement, which comes soon after the withdrawal of U.S. troops from Afghanistan, is part of broader effort by Biden to focus on the Indo-Pacific region and recruit allies to counter what his administration sees as an increasingly militant and authoritarian China.

Under the Biden administration, Washington and Beijing have clashed over human rights, trade, the South China Sea and Taiwan. As the United States attempts to engage China on climate pledges ahead of a key international summit in November, there have been few signs of progress. A 90-minute call between Chinese President Xi Jinping and Biden last week resulted in few specifics. During the call, Xi said U.S. policies have caused “serious difficulties” in the relationship, according to the official Xinhua News Agency.

Glaser said she expects Beijing to exert more pressure on Australia and the United Kingdom to “deter others from banding together” against China. “In Chinese, that’s ‘killing the chicken to scare the monkey,’ ” she said.

On Thursday, the state-run Global Times described the United States as “losing its mind trying to rally its allies against China” and accused Australia of becoming a “running dog” of Washington. China and Australia have been locked in a trade war for more than a year as relations have deteriorated.

“Since Australia has become an anti-China spearhead, the country should prepare for the worst,” the editorial warned.

Others say Beijing has little recourse to pressure those involved in the alliance. “There is not a lot they can do in material terms because the relationship with the U.S. is already at rock bottom. They have already imposed sanctions on Australia and threatened it so much that their bullying tactics have proven to be counterproductive,” said Christopher Hughes, a professor of international relations at the London School of Economics and Political Science, focusing on Chinese foreign policy.

According to Hughes, while the new alliance is likely to fan already high anti-Western nationalism in China, it could also “add fuel to growing concerns inside China” over Xi’s expanding crackdown on the private sector and society and a weakening economy.

“If they are wise, they will realize that this alignment is the result of their own assertiveness and change tack,” he said. “[China] does not have a lot of cards to play.”