Reddit said Friday that interim CEO Ellen Pao resigned from the company, and co-founder Steve Huffman is back as its CEO.

The freewheeling online discussion forum and news site, which says it had 164 million unique visitors last month, has been rocked by unrest recently. The firing of a popular staffer earlier this month upset some users, leading to volunteers shutting down parts of the site, and there have been protests over new policies intended to fight harassment.

A statement posted on Reddit by Reddit board member Sam Altman Friday said that Pao, who became interim CEO in November, resigned from Reddit by mutual agreement and will continue to advise the board for the rest of 2015.

Altman acknowledged that Reddit moderators should have better tools and communication from the company, but took some users to task for the nature of their comments about Pao.

He said Reddit accepts disagreements, but said the site must exercise compassion if it wants to be a great community and said some of the things Reddit users wrote about Pao were "sickening."

"Disagreements are fine. Death threats are not, are not covered under free speech, and will continue to get offending users banned," Altman wrote.

Pao defends policy changes

In an email, Pao said she resigned because Reddit's board was asking for faster user growth than she could deliver while holding on to the site's core values. She defended Reddit's policy changes, saying that despite criticism, the new rules are making the community stronger.

"We've taken bold and often controversial stances, but always with the greater good of the community in mind," she said. "We tackled the thorny issues of harassment on the site, banning harassing behavior without censoring ideas. Though we came under fire on many fronts, we did not waver, working 24/7 to try to keep the site harassment-free."

In a statement posted to Reddit, Pao thanks users who were supportive, saying the positives from the site far outweighed the negatives, and she urged Redditors to "remember the human" behind the keyboard.

Controversial new harassment rules

This month Reddit fired Victoria Taylor, who helped run the site's popular "Ask Me Anything" feature, where Reddit users submit questions to celebrities and other notable people. President Barack Obama, for example, has answered questions on that forum. Some volunteer moderators protested her ouster by shutting down sections of the site, including Ask Me Anything.

Reddit also announced anti-harassment guidelines this year and in June it banned a few groups for violating those rules. Reddit is known for an almost-anything goes style, but leadership said in May that it was unhappy with harassment on its site and survey data showed its users were also upset about the behavior. The company apologized and said it would do a better job of communicating with moderators and users.

Early this year Reddit said it would remove photos, videos or links that featured explicit content if the person in the image didn't give permission for it to be posted. That came months after hackers obtained nude photos of Jennifer Lawrence and other celebrities and posted them to Reddit, among other social media sites.

Huffman co-founded Reddit in 2005 with Alexis Ohanian. Conde Nast acquired Reddit the following year, and both Huffman and Ohanian left the company in October 2009. Ohanian returned as San Francisco-based Reddit's executive chairman in November.

Before becoming Reddit's CEO, Pao had worked for a storied Silicon Valley venture capital firm, Kleiner Perkins Caufield & Byers. She lost a high-profile gender discrimination lawsuit against Kleiner Perkins in March that brought up issues of the gender imbalance and difficulties faced by women working in Silicon Valley. Pao is appealing the decision.