China on Monday rejected criticism from the US defense secretary, Ashton Carter, accusing him of harboring a cold-war mentality and saying Beijing had no interest in “playing a role in a Hollywood movie” of Washington’s design.

A foreign ministry spokeswoman, Hua Chunying, told reporters Carter’s comment last week that China was creating a “Great Wall of self-isolation” was merely an attempt to provide cover for US plans to deploy additional military forces to the Asia-Pacific region.

Carter’s remarks “laid bare the stereotypical US thinking and US hegemony”, Hua said at a daily news briefing.

China has reclaimed 3,200 acres in the South China Sea, says Pentagon

Read more

“Indeed, there are some in the US who live physically in the 21st century, but whose minds are stuck in the cold war era,” she said.

“China has no interest in any form of cold war, nor are we interested in playing a role in a Hollywood movie written and directed by certain US military officials. However, China has no fear of and will counter any actions that threaten and undermine China’s sovereignty and security.”

In a commencement speech Friday at the US Naval Academy, Carter said China wants and enjoys the benefits of free trade and a free internet, but sometimes chooses to restrict both.

He said the US also continues to be concerned about Beijing’s actions in the disputed South China Sea, where it has sought to strengthen its claim to almost the entire region by building new islands atop coral outcroppings and adding airstrips, harbors and military infrastructure.

The US is committed to upholding the freedom of navigation and commerce, and peaceful resolution of disputes, Carter said.

“China’s actions [in the South China Sea] challenge fundamental principles, and we can’t look the other way,” Carter said.