Facebook has been forced to apologise after it spent hours suggesting bizarre, vulgar and upsetting searches to users on Thursday night.

The social network’s search suggestions, which are supposed to automatically offer the most popular search terms to users, apparently broke around 4am in the UK, and started to suggest unpleasant results for those who typed in “video of”.

Multipleusersposted examples on Twitter, with the site proposing searches including “video of girl sucking dick under water”, “videos of sexuals” and “video of little girl giving oral”. Others reported similar results in other languages.

Even after the offensive search terms stopped being displayed, users still reported odd algorithmic suggestions, seemingly far from what Facebook would normally offer, such as “zodwa wabantu videos and pics” (a South African celebrity) and “cristiano ronaldo hala madrid king video call”.

In a statement, Facebook apologised and said it was investigating the issue: “As soon as we became aware of these offensive predictions we removed them. Facebook search predictions are representative of what people may be searching for on Facebook and are not necessarily reflective of actual content on the platform.

“We do not allow sexually explicit imagery, and we are committed to keeping such content off of our site.”

Search engine autocompletions are a regular source of concern for Silicon Valley. Google has repeatedly faced criticism over the questions it proposes for users, with suggested searches over time including “are jews evil”, “are women evil” and “are muslims bad”.

Last week, Facebook faced international criticism after the Guardian found it running a survey that asked users whether paedophiles should be allowed to proposition children for sexual pictures on the site. Facebook admitted the surveys were a mistake, adding that it has “no intention” of allowing the behaviour.

“We run surveys to understand how the community thinks about how we set policies,” the company’s vice president of product, Guy Rosen, said. “But this kind of activity is and will always be completely unacceptable on FB. We regularly work with authorities if identified. It shouldn’t have been part of this survey. That was a mistake.”