The move, announced in a blog post, comes after pressure from advocacy groups. It appears to target content that falls into a gray area — likely to be deemed offensive by many, but which doesn’t go far enough to be banned by the site.

“Our goal is to both preserve the freedoms of sharing on Facebook but also protect people and brands from certain types of content,” the post reads.

In May, Facebook was targeted by a coalition of women’s organizations complaining about pages or groups that seemed to celebrate or make light of violence against women. As part of the campaign, the groups petitioned Facebook advertisers.

The campaign appeared to have some effect. Several advertisers, including Nissan UK and Nationwide, said they were pulling ads from Facebook, while others said they were monitoring the situation. In response, the site announced it was redoubling efforts to stamp out hate speech.

Now Facebook says it’s implementing new standards for which pages or groups may have advertising placed on them.

“For example, we will now seek to restrict ads from appearing next to Pages and Groups that contain any violent, graphic or sexual content (content that does not violate our community standards),” the post reads. “Prior to this change, a Page selling adult products was eligible to have ads appear on its right-hand side; now there will not be ads displayed next to this type of content.”

The process will begin with potentially offensive pages being flagged by humans but will eventually give way to “a more scalable, automated way to prevent and/or remove ads appearing next to controversial content.”

With more than 1 billion users to monitor and sometimes grumbly investors to please, Facebook finds itself having to satisfy users of the free service as well as the advertisers that provide the vast majority of its revenue.

“Like any digital platform, we’re not going to be perfect but we will be much better,” Facebook said. “We’ll continue to work aggressively on this issue with advertisers. We are confident the immediate steps we’re taking will result in a significantly improved approach to preventing these instances from occurring, and we are committed to making this process work for everyone who uses Facebook.”