SAN FRANCISCO (Reuters) - U.S. Defense Secretary Ash Carter on Tuesday warned China against “aggressive” actions in the South China Sea region, including the placement of surface-to-air missiles on a disputed island.

“China must not pursue militarization in the South China Sea,” Carter said in a wide-ranging speech at the Commonwealth Club in San Francisco. “Specific actions will have specific consequences.”

Asked what the consequences could be, Carter told reporters the U.S. military was already increasing deployments to the Asia-Pacific region and would spend $425 million through 2020 to pay for more exercises and training with countries in the region that were unnerved by China’s actions.

He said China’s behavior had fueled trilateral agreements that would have been “unthinkable” even a few years ago.

The United States has carried out several freedom of navigation exercises in the South China Sea recent months, sailing near disputed islands to underscore its rights to navigate the seas. U.S. Navy officials say they plan to conduct more and increasingly complex exercises in the future.

Carter said the Pentagon also planned to spend over $8 billion in fiscal 2017 alone to expand its fleet of powerful submarines and undersea drones.

“There is no question that there are consequences for these actions,” Carter said. “We have plans in all three of these categories. You’ll see them unfolding.”

Carter underscored the U.S. military’s determination to safeguard maritime security around the world, and particularly in the South China Sea region, which sees about 30 percent of the world’s trade transit its waters each year.

The U.S. defense chief also took aim at both Russia and China for their actions to limit Internet access, as well as state-sponsored cyber threats, cyber espionage and cyber crime.

He said the Pentagon would spend $35 billion over the next five years to beef up cybersecurity and develop offensive cyber options to defeat the Islamic State militant group and other enemies.

In his prepared remarks, Carter drew a sharp contrast between such behavior by Russia and China and what he described as much healthier U.S. actions to preserve Internet freedom.

“We don’t desire conflict with either country,” he said. “But we also cannot blind ourselves to their apparent goals and actions.”

Carter also cited U.S. concerns about Chinese and Russian efforts to develop anti-satellite weapons that could destroy critical U.S. national security satellites, citing China’s 2007 anti-satellite test that created over 3,000 pieces of debris