Twitter has been successfully weeding out terrorism from its network.

The company revealed Tuesday it removed 299,649 accounts over the first six months of 2017. That may sound like a lot, but it's a 20 percent decline from the previous six months. Twitter also reported 75 percent of the accounts removed were suspended before they posted their first tweet.

The decline in account suspensions doesn't mean Twitter is doing less work. Rather, the company has created tools and taken steps that have apparently improved its work on curbing terrorism, according to Twitter's transparency report.

That's great news for Twitter as the company tries to regain user growth and retention and also keep advertisers happy.

Twitter reported 95 percent of accounts suspensions "were the result of our internal efforts to combat this content with proprietary tools" instead of responding to government requests for takedowns. That's a bump from 74 percent reported between July and December 2016.

Government terms of service reports have dropped. Image: twitter

U.S. lawmakers, European governments, and watchdog groups have pushed for Facebook, Twitter, Google, and other tech companies to combat terrorism, as evidence mounts that radical Islamist groups have been successful in using online networks to recruit, circulate propaganda, and promote violence.

Twitter, for its part, has been quite public about the steps it has taken and has advocated for transparency between governments and the tech industry. Notably, Twitter is one of the few companies that did not share data with the U.S. government as revealed by NSA whistleblower Edward Snowden.

Back in 2014, Twitter sued the U.S. government for the right to publish aggregated data requests like the one released Tuesday. The U.S. government argued that these precise numbers are a national security risk while Twitter argued blocking these reports violates First Amendment rights.

Twitter won the case in July after a federal judge in California ruled the government's reasons were unsubstantiated. The report released Tuesday is Twitter's 11th transparency report.

From August 2015 to June 2017, Twitter suspended 935,897 accounts for the promotion of terrorism.

While Twitter has had a disappointing history on the stock market and talks for the company to be acquired this time last year fell apart, the company has been on a good news streak as of late. Back in April, Twitter had a return of user growth and said less abuse was being reported across the site.

"There's a lot more to do but we're on the right path," CEO Jack Dorsey said at the time. "We're focused on only what matters."