Twitter has apologized for allowing advertisers to target hate groups.

The BBC investigated whether advertisers could target homophobic, neo-Nazi or white supremacist users on Twitter.

The British network revealed it was possible to reach users who had shown interest in keywords such as “transphobic,” “anti-gay” and “islamophobic.”

The BBC created simple ads to see whether Twitter would stop the ads from running. Each was approved but the outlet canceled them after a few hours.

In a statement, Twitter apologized and said that it would correct the issue.

"[Our] preventative measures include banning certain sensitive or discriminatory terms, which we update on a continuous basis," Twitter said. "In this instance, some of these terms were permitted for targeting purposes. This was an error."

"We're very sorry this happened and as soon as we were made aware of the issue, we rectified it. We continue to enforce our ads policies, including restricting the promotion of content in a wide range of areas, including inappropriate content targeting minors."