Within hours of Jensen Huang’s admission on Sunday that he had been unfaithful to his wife, some of Silicon Valley’s most influential investors closed ranks around him.

Their messages, delivered mostly on social media, were consistent. Mr. Huang’s relationship with a woman identified by U.S. officials as a Chinese spy was a personal failing. Losing the Nvidia chief executive, they argued, would be a far bigger blow to the country, and America couldn’t win the artificial intelligence race without him.

“Jensen is one of the greatest entrepreneurs of this generation,” Shaun Maguire, a partner at Sequoia Capital, wrote in a post on Sunday afternoon. He said that Mr. Huang “did something incredibly dumb,” and that it was bad for America, “but my guess is there was no bad intention.” He concluded that Mr. Huang is “irreplaceable for America’s AI leadership.”

About an hour later, Elon Musk quoted the post and added: “I agree.”

The show of loyalty reflects Mr. Huang’s rarefied standing in Silicon Valley. In the three decades since he co-founded Nvidia, he has gone from running a maker of video game graphics cards to presiding over the company at the center of the A.I. boom, now one of the world’s most valuable companies.

Nvidia’s chips are the scarce resource every A.I. company needs, a position that makes Mr. Huang something of a kingmaker. Decisions about who gets his products, and how many, can shape which start-ups and tech giants pull ahead. Nvidia’s finances are also deeply intertwined with other leading A.I. companies, including OpenAI and Anthropic.

(China has rejected the espionage claims. Alice Huang, the Chinese executive accused of spying for Beijing, has not responded to requests for comment.)