Twitter Inc. (TWTR) - Get Report is cleaning up its social network and some of its most popular users are paying the price - in followers. 

Former U.S. President Barack Obama lost 400,000 of his 104 million followers while current President Donald Trump lost 100,000 of his 53.4 million followers. Twitter in recent weeks has been removing accounts that are bad actors on its network.

The locked accounts that were deleted had been flagged for "sudden changes in account behavior," according to a statement by the company.  Twitter said those sudden changes include tweeting misleading links, or if a large number of accounts block the account after mentioning them. 

"Most people will see a change of four followers or fewer; others with larger follower counts will experience a more significant drop. We understand this may be hard for some, but we believe accuracy and transparency make Twitter a more trusted service for public conversation," said Vijaya Gadde, legal, policy, trust and safety lead at Twitter.

Twitter expects to delete potentially as much as 6% of its 336 million active users. 

Twitter shares were up 1.4% on Thursday.