“I believe that if America does not lead innovation in the digital currency and payments area, others will,” Mr. Marcus said. “If we fail to act, we could soon see a digital currency controlled by others whose values are dramatically different.”

Mr. Zuckerberg, who speaks Mandarin, is an odd choice to lead the charge against China. He has spent much of the last decade trying desperately to curry favor with the Chinese government in hopes of getting Facebook’s apps — which are banned there — permission to operate in one of the world’s most lucrative markets. Mr. Zuckerberg even reportedly offered to let Xi Jinping, the Chinese president, name his second child. (Mr. Xi declined.)

Google, too, is rallying around the flag. The company’s chief executive, Sundar Pichai, went to the White House to visit with President Trump in March, to discuss government contracts and reassure the president that Google does not discriminate against conservatives. This month, in a series of tweets attacking Mr. Pichai and Google, Mr. Trump recalled that meeting, which he described as “Mr. Pichai working very hard to explain how much he liked me, what a great job the Administration is doing, that Google was not involved with China’s military, that they didn’t help Crooked Hillary over me in the 2016 Election.”

Like Mr. Zuckerberg, Mr. Pichai was a China booster before he began distancing himself from the country. Last year, Mr. Pichai had a large team of Google engineers building a prototype search engine, called Dragonfly, that was designed to be compatible with China’s censorship regime. The project was dropped amid heated internal dissent from Google employees. But it reportedly would have blocked sites like Wikipedia, as well as other material considered objectionable by Chinese authorities.

Amazon and Apple, two tech giants that love America so much that they have gone to elaborate lengths to avoid paying taxes to its Treasury, are also promoting themselves as national champions. After Mr. Trump criticized Apple’s plans to do some of the assembly of its Mac Pro in China, the company reiterated its desire to keep much of the computer’s assembly in the United States. And Amazon’s chief executive, Jeff Bezos, has knocked rival firms for insufficient patriotism, saying that “if big tech companies are going to turn their back on the U.S. Department of Defense, this country is going to be in trouble.”

Representatives for Facebook, Google, Amazon and Apple all declined to comment.

Conspicuous patriotism is not a new tactic for companies accused of bad behavior. In the 1980s and 1990s, defenders of American tech giants like IBM and Microsoft argued that those companies’ monopolistic behaviors were necessary to stave off competition from Japanese rivals. During World War II, Hollywood movie studios delayed a federal antitrust crackdown, in part by agreeing to help the military in the war effort.

Meredith Whittaker , a co-founder of the AI Now Institute at New York University and a former Google employee, characterized the tech industry’s scaremongering about China as a tactical move meant to deflect criticism.