This photo shows Mozilla co-founder and CEO Brendan Eich. Eich is stepping down as CEO and leaving the company following protests over his support of a gay marriage ban in California.

SAN JOSE, California — The resignation of Mozilla’s CEO amid outrage that he supported an anti-gay marriage campaign is prompting concerns about how Silicon Valley’s strongly liberal culture might quash the very openness that is at the region’s foundation.

Mozilla co-founder Brendan Eich stepped down Thursday as CEO, just days after his appointment. He left the nonprofit maker of the Firefox browser after furious attacks, largely on Twitter, over his $1,000 contribution to support of a now-overturned 2008 gay-marriage ban in California.

“There was no interest in creating an Internet lynch mob,” OkCupid co-founder Sam Yagun, whose dating service site was among those engaged in online protest, said Friday. “I am opposed to that with every bone in my body.”

But Eich’s abrupt departure has stirred the debate over the fairness of forcing out a highly qualified technology executive over his personal views and a single campaign contribution six years ago. And it raises questions about how far corporate leaders are allowed to go in expressing their political views.

Some are also questioning whether the episode undercuts the well-groomed image of Silicon Valley as a marketplace of ideas and diversity of thought, and whether, in this case, the tech world surrendered to political correctness enforced through a public shaming on social media.

OkCupid never demanded Eich resign, and after discussing the issue with Mozilla, Yagun ended the call for a Firefox boycott Wednesday afternoon.

In retrospect, however, Yagun said he wished he had framed the Firefox boycott in a slightly different light.

“I would have loved to have engaged in a debate over what happens when freedoms collide,” Yagun said. “We have freedom of speech, which I would defend to the end. And we have what I believe is a fundamental liberty of people to marry and love whoever they want. We took a stand that matters to us personally and as a business — and I think the world will be a better place because of it.”

While a handful of workers at top tech firms including Apple, Yahoo and Google supported the gay-marriage ban, the vast majority gave money to oppose it.

“Mozilla believes both in equality and freedom of speech,” Baker said. “Equality is necessary for meaningful speech. And you need free speech to fight for equality. Figuring out how to stand for both at the same time can be hard.”

Eich’ s technical reputation is strong. He created JavaScript and helped write the code to run Netscape’s Navigator web browser before co-founding Mozilla.

Mozilla, which is based in Mountain View, California, declined to make any further comment Friday. Eich did not respond to requests for comment.