Screenshot shows U.S. President Barack Obama's Twitter account @POTUS44.

Twitter Chief Executive Officer Jack Dorsey apologized on Saturday for the glitch that forced half a million unwitting users to follow the @POTUS account after it was handed over to U.S. President Donald Trump.

He explained in a series of tweets that users who chose to follow President Barack Obama's new handle @POTUS44 after Friday noon were automatically set to also follow the @POTUS account, which has been controlled by the Trump administration after his inauguration.

In addition, "some people who unfollowed @POTUS in the past were mistakenly marked to now follow @POTUS," Dorsey tweeted, adding that "this also affected other official administration accounts like @VP, @WhiteHouse, and @PressSec."

"We believe this affected about 560,000 people. This was a mistake, it wasn't right, we own it, and we apologize. No excuses," he said.

The social media company began to investigate the glitch after a few users complained that they were unwittingly made to follow @POTUS after the Trump team took it over.

Under the Twitter transition, all of the official tweets and followers accumulated during the Obama era were removed and archived on a set of newly created accounts including @POTUS44, @VP44 and @FLOTUS44.

Trump, who has said Twitter is the only way he can counteract "fake news," continued to send tweets from his personal account @realDonaldTrump, which has more than 21 million followers.