CNN's Anderson Cooper said Wednesday morning that a tweet from his account responding to President Trump, calling him a “pathetic loser,” was not, in fact, posted by him.

After the stunning loss of Republican candidate Roy Moore in a special election to fill an Alabama Senate seat, Trump said in a Twitter post that he originally did not back Moore because he did not think Moore could win, which is why he endorsed another candidate in the Alabama primary.

“The reason I originally endorsed Luther Strange (and his numbers went up mightily), is that I said Roy Moore will not be able to win the General Election. I was right! Roy worked hard but the deck was stacked against him!"

Cooper's account then responded by saying, “Oh Really? You endorsed him you tool! Pathetic loser.” That tweet has since been deleted.

In a follow-up tweet, Cooper said that his account had been hacked. Cooper denied writing the message to the president: “just woke up to find out someone gained access to my twitter account. i have not sent a tweet in days or replied to any tweets. We are looking into how this happened,” he said.

CNN's communications team issued a statement on Twitter as well, backing up Cooper's explanation that an unauthorized person gained control of his account. “This morning someone gained access to the handle @andersoncooper and replied to POTUS. We're working with Twitter to secure the account.”

Twitter declined to comment.

In a statement, CNN said that the tweet was not sent from Cooper's phone, but from the phone of his assistant. According to CNN, someone took possession of the assistant's phone while he was at the gym and sent the tweet. The assistant is the only other person with access to Cooper's Twitter account, CNN said.