Longtime anchor Don Lemon is out at CNN.

On Monday morning, Lemon took to Twitter to announce the news, which apparently blindsided him.

“I was informed this morning by my agent that I have been terminated by CNN. I am stunned,” Lemon wrote in a post he tweeted. “After 17 years at CNN I would have thought that someone in management would have had the decency to tell me directly. At no time was I ever given any indication that I would not be able to continue to do the work I have loved at the network.”

Lemon was on the air Monday morning and it appeared that it was business as usual.

“It is clear that there are some larger issues at play,” his statement continued. “With that said, I want to thank my colleagues and the many teams I have worked with for an incredible run. They are the most talented journalists in the business, and I wish them the best.”

However, CNN disputes Lemon’s account of his termination.

“Don Lemon’s statement about this morning’s events is inaccurate,” the network tweeted. “He was offered an opportunity to meet with management but instead released a statement on Twitter.”

Prior to Lemon’s tweets, CNN released a statement, which was obtained by The New York Times.

“CNN and Don have parted ways,” the statement said. “Don will forever be a part of the CNN family, and we thank him for his contributions over the past 17 years. We wish him well and will be cheering him on in his future endeavors.”

“‘CNN This Morning’ has been on the air for nearly six months, and we are committed to its success,” CNN said.

Lemon anchored the morning show alongside Poppy Harlow and Kaitlan Collins.

Earlier this year he caused an uproar during a discussion on-air about the ages of politicians. He said that the 51-year-old former South Carolina Governor Nikki Haley was not “in her prime,” when she announced her plans on running for president. A woman, he said, was considered in her prime “in her 20s, 30s and maybe her 40s.”

Harlow challenged Lemon, trying to clarify what he was referencing: “I think we need to qualify. Are you talking about prime for childbearing or are you talking about prime for being president?”

“Don’t shoot the messenger, I’m just saying what the facts are,” Lemon responded. He brought up the subject again an hour later, and was rebutted by commentator Audie Cornish.

Lemon issued a statement the same day saying he regretted his “inartful and irrelevant” comments. He was subsequently absent from the show for three days, returning the following week with a tweeted apology but no mention of the episode on the air.

CNN CEO Chris Licht told staffers in a memo at the time that Lemon would undergo “formal training,” but did not specify what that would entail. Licht added that it was important to him that the network “balances accountability with … fostering a culture in which people can own, learn and grow from their mistakes.”

Lemon used to host the prime-time “Don Lemon Tonight” but moved to the mornings when the network launched “CNN This Morning” last November, just before the U.S. midterm elections, as one of the first major programming moves under Licht. But the show hasn’t had the intended ratings effect, and CNN leadership urged patience last month amid a downturn in viewership across the board.

Haley, who had criticized Lemon’s statements as sexist and used the incident to fundraise in February, took to Twitter on Monday to call Lemon’s ouster “a great day for women everywhere,” linking to the beverage sleeves emblazoned with “Past my prime? Hold my beer.”