SAN FRANCISCO — Secretary of Defense Ash Carter used a keynote address in San Francisco on Tuesday to draw stark parallels between the policies of the United States and those of China, particularly on freedom of commerce and the Internet.

Speaking to the Commonwealth Club, Carter highlighted three major areas — the sea, cyber and space — that he said the US helps protect as an open commons, before contrasting the Pentagon's policies with those of China.

His speech is the opening salvo of a weeklong, West Coast swing where Carter will be talking to tech industry leaders as he seeks to convince them to partner more with the Department of Defense.

A senior defense official, speaking on background before the speech, made it clear the secretary's comparisons to China were there for a reason.

"Whereas we believe the United States helps support our global economy, we're seeing another nation play a spoiler on that role, and I think the secretary wants to draw that contrast heading into a week where he'll be engaging with a number of leaders in the business community," the official said.

That term "spoiler" appeared throughout Carter's prepared remarks, and while the secretary included a reach out to China, it was hard not to see he was trying to spell out a comparison for the Silicon Valley crowd.

"America's efforts in this region have never been aimed to hold any nation back or push any country down. The United States wants every nation to have an opportunity to rise," he said.

There are major industrial ties between Silicon Valley and China, with notable companies such as Apple relying on Chinese production lines for products. San Francisco is also a major hub for goods shipped from the Pacific.

On the naval front, Carter boasted of the funding in the fiscal 2017 budget request for the Pacific, including $8 billion in funding for submarines. He also acknowledged concerns about China's militarization of islands in the South China Sea, including the recent placement of surface-to-air missiles on Woody Island.

"China must not pursue militarization in the South China Sea. Specific actions will have specific consequences," Carter said, before drawing a comparison between how the US looks at the lanes of commerce in the Pacific and how China views them.

"Indeed, while some in the region appear determined to play spoiler, the United States and our many friends in the region don't plan on letting anyone upend seven decades' worth of progress. For our part, it should be clear that the U.S. military will continue to fly, sail and operate wherever international law allows, as we do all over the world. Because the maritime domain must always be open and free to all," he said.

In space — a growing realm of interest for the Silicon Valley crowd — Carter emphasized how Defense Department programs like GPS have made products from Silicon Valley possible. In comparison, he said, a 2007 anti-satellite weapon test from China caused major space debris issues that impact all nations.

"A kinetic battle in space could leave behind a legacy that would last far longer and make this common domain hazardous for commercial applications for generations. And make no mistake, both Russia and China have developed such anti-satellite systems," the secretary said. "Just like with the maritime and cyber domains, it's in the self-interest of every nation to advance the common interest of a free and stable environment in space."

Finally, on the realm of the Internet, Carter compared US policies to those by China and Russia to obtain "absolute government control of the internet."

"We've seen that China aims to, as one news headline put it last year, 'rewrite the rules of the global Internet,' limiting the access their 1 billion-plus citizens have to an open society," Carter said. "China has also indicated intent to require backdoors for all new technologies — potentially forcing the world to operate, and innovate, on China's terms.

"That's not right."

Aaron Mehta was deputy editor and senior Pentagon correspondent for Defense News, covering policy, strategy and acquisition at the highest levels of the Defense Department and its international partners.

More In Home