| In Silicon Valley, where personal quirks and even antisocial personalities are tolerated as long as you are building new products and making money, a socially conservative viewpoint may be one trait you have to keep to yourself.

On Thursday, Brendan Eich, who has helped develop some of the web’s most important technologies, resigned under pressure as chief executive of Mozilla, the maker of the popular Firefox web browser, just two weeks after taking the job. The reason? In 2008, he donated $1,000 in support of Proposition 8, a California measure that banned same-sex marriage.

Photo

Once Mr. Eich’s support for Proposition 8 became public, the reaction was swift, with a level of disapproval that the company feared was becoming a threat to its reputation and business.

For example, OkCupid, a popular online dating service, set up a letter, visible to those visiting its site on Firefox, that castigated the chief executive. “Mozilla’s new CEO, Brendan Eich, is an opponent of equal rights for gay couples,” the letter said. “We would therefore prefer that our users not use Mozilla software to access OkCupid.”

The letter, which has since been removed, concluded that “those who seek to deny love and instead enforce misery, shame and frustration are our enemies, and we wish them nothing but failure.”

Mr. Eich’s departure from the small but influential Mountain View, Calif., company highlights the growing potency of gay-rights advocates in an area that, just a decade ago, seemed all but walled off to their influence: the boardrooms of major corporations.

But it is likely to intensify a debate about the role of personal beliefs in the business world and raise questions about the tolerance for conservative views inside a technology industry long dominated by progressive and libertarian voices.

Andrew Sullivan, a prominent gay writer and an early, influential proponent of making same-sex marriage legal, expressed outrage over Mr. Eich’s departure on his popular blog, saying the Mozilla chief had been “scalped by some gay activists.”

“If this is the gay rights movement today — hounding our opponents with a fanaticism more like the religious right than anyone else — then count me out,” Mr. Sullivan wrote.

A number of gay rights advocates pointed out that their organizations did not seek Mr. Eich’s resignation. Evan Wolfson, a leading gay marriage advocate, said that this was a case of “a company deciding who best represents them and their values. There is no monolithic gay rights movement that called for this.”

Throughout the controversy, Mr. Eich, who is in his early 50s, refused to repudiate his donation, even after being asked personally to do so in a meeting with two prominent software developers, who said they would no longer create apps for Firefox.

While he was being portrayed as an opponent of gay people, Mr. Eich said he believed in inclusiveness within Mozilla and had never discriminated. A different issue was at stake, he said — the right not to be judged for one’s private beliefs. This right was vital to a collaborative software project like the Firefox browser, he said, because it harnesses the work of volunteers and contributors from around the world in a competition with large corporations like Google and Microsoft.

“If you can’t leave your other stuff at the door you’re going to break into other groups,” he said in an interview. “We have to be one group.”

Mr. Eich said he had a number of gay supporters within Mozilla who didn’t agree with his personal beliefs, but supported him as chief executive. He said the issue of his donation came to light in 2012 at a conference. When a friend who would have been barred from marrying by the successful Proposition 8 effort learned of his donation, “I could see the pain in her eyes. I’m sorry that people felt a lot of pain,” he said. Proposition 8 has since been struck down in federal court.

The conflicting values between free speech and gay rights were a riddle that was hard for many Mozilla officials to solve, and there is no indication that Mr. Eich behaved in a biased manner at work.

In one blog post, Geoffrey MacDougall, the head of development for Mozilla, described the confusion within the organization. “The free speech argument is that we have no right to force anyone to think anything,” he wrote. “We have no right to prevent people from pursuing their lives based on their beliefs.”

At Mozilla, embracing various viewpoints holds particular meaning. It was one of the pioneers of a type of software development, called open source, that is now widely used in the technology industry. Mr. Eich helped found the company in early 1998 after working at Netscape, where he developed the JavaScript programming language commonly used on websites.

Earlier this week, Mr. Eich said that he would not resign and asked Mozilla’s critics to give him time to show that he could separate his personal views from the way his company conducts business. But Mozilla announced his abrupt departure in a blog post two days later.

In a subdued post on his personal blog on Thursday, Mr. Eich wrote about several programming issues he hopes to solve and said he had resigned as chief executive at Mozilla and hoped to travel with his family. He did not directly address the controversy.

“We didn’t act like you’d expect Mozilla to act,” wrote Mitchell Baker, the executive chairwoman of Mozilla. “We didn’t move fast enough to engage with people once the controversy started. We’re sorry. We must do better.”