"Ghostbusters" star Leslie Jones publicly abandoned Twitter, one of several celebrities to do so after becoming the target of sexist and racist abuse on the service.

Jones, who is black, fielded a barrage of Twitter harassment before she gave up, all because, as she put it, "I did a movie." Twitter users hurled racist slurs, compared the comic actress to the gorilla recently killed at the Cincinnati Zoo and sent Jones obscene pictures.

Twitter banned conservative provocateur Milo Yiannopoulos, technology editor of the right-wing site Breitbart News, for "participating in or inciting targeted abuse of individuals," according to a Twitter notice emailed to Yiannopoulos and published on Breitbart. Twitter confirmed the authenticity of the notice.

The move represents Twitter's latest attempt to get a handle on its Wild West reputation as a haven for online harassment and abuse while still holding onto its commitment to free speech. It's a tricky balancing act, one that Twitter admits it hasn't gotten right yet.

"We know many people believe we have not done enough to curb this type of behavior on Twitter. We agree," Twitter said in an emailed statement following the Jones incident. "We are continuing to invest heavily in improving our tools and enforcement systems to better allow us to identify and take faster action on abuse as it's happening and prevent repeat offenders."

A representative for Jones did not respond to a request for comment on Wednesday. Yiannopoulos did not reply to emails seeking comment.

Jones is certainly not the first celebrity to leave Twitter. "Girls" creator Lena Dunham said last fall that she has people manage her Twitter account for her because it was no longer a "safe space," as she told technology journalist Kara Swisher during a podcast. Zelda Williams, the daughter of Robin Williams, left for a brief period in 2014 after users sent her altered images of her deceased father. She later returned and thanked her supporters.

Online harassment has long been a problem for the internet. But because of Twitter allows most conversations to play out in public and allows for relative anonymity, it has been especially visible there. And it's especially challenging because so much resembles online mob action, with numerous pseudonymous accounts ganging up to tweet vile messages at particular individuals.

Yiannopoulos has a reputation as a ringleader of such efforts; Twitter's notice described him as a repeat offender of its rules against abuse and incitement. He describes himself on his Facebook page as "the most fabulous supervillain on the internet," and generally revels in his status as a politically incorrect firestarter. But in the Breitbart article, Yiannopoulos claimed Twitter was holding him responsible for "the actions of fans and trolls."

Some targets of abuse say that's exactly how Twitter harassment frequently works. In Jones' case, followers of Yiannopoulos didn't stop with racial slurs. Some tweeted images doctored to make it appear that Jones herself was sending out homophobic tweets against Yiannopoulos, who is openly gay.

"When (Yiannopoulos) targeted me, I got death threats, so I had to go to the police, I got 'doxed' so my personal information (was) out there," said Brianna Wu, a software engineer who was critical of the "Gamergate" movement, a 2014 harassment campaign against female game developers. "It is not a joke. It has tremendous psychological cost to the person targeted and can also endanger their lives."

While anyone can experience online abuse, young women are especially vulnerable, according to data from the Pew Research Center. In its most recent study on the issue, from 2014, Pew found that women aged 18 to 24 experience certain severe types of harassment at disproportionately high levels. More than a quarter of this age group said they have been stalked online and a quarter said they were the target of online sexual harassment, according to Pew.

Wu, who is still on Twitter, praised Twitter for "really working behind the scenes" to improve its anti-harassment policy, while acknowledging that changes are not coming as fast as many users would like.

"The core problem is that Twitter was made in an age when they didn't think about the issue of harassment as they were building it," she said. "An overwhelming number of people working on Twitter were straight, white men. It was (just) not on their mind for a while."

In software coding lingo, she notes, this is called "technical debt." A problem that would have been much easier to solve at the outset is now much harder to fix.