The culture wars that have consumed politics in the United States have now landed on Silicon Valley’s doorstep.

That became clear this week after Google on Monday fired a software engineer, James Damore, who had written an internal memo challenging the company’s diversity efforts. The firing set off a furious debate over Google’s handling of the situation, with some accusing the company of silencing the engineer for speaking his mind. Supporters of women in tech praised Google. But for the right, it became a potent symbol of the tech industry’s intolerance of ideological diversity.

Silicon Valley’s politics have long skewed left, with a free-market’s philosophy and a dash of libertarianism. But that goes only so far, with recent episodes putting the tech industry under the microscope for how it penalizes people for expressing dissenting opinions. Mr. Damore’s firing has now plunged the nation’s technology capital into some of the same debates that have engulfed the rest of the country.

Such fractures have been building in Silicon Valley for some time, reaching even into its highest echelons. The tensions became evident last year with the rise of Donald J. Trump, when a handful of people from the industry who publicly supported the then-presidential candidate faced blowback for their political decisions.