Former Fox News host Bill O'Reilly says ABC was right to pull the plug on the sitcom "Roseanne" following star Roseanne Barr's racist remarks on Twitter Tuesday morning.

O'Reilly, who was ousted by Fox News last year following a string of sexual harassment allegations, said Barr's "vicious personal attack" on Valerie Jarrett came out of nowhere.

"Roseanne Barr's vicious personal attack on former Obama senior adviser Valerie Jarrett came out of nowhere and cost Ms. Barr and the entire staff of her program their jobs," O'Reilly tweeted hours after ABC announced it's decision to cancel the sitcom.

The move to cancel Barr's rebooted sitcom - which premiered with record-high ratings in March - came just hours after the actress sparked a firestorm with what she later called a "bad joke" about the Obama-era White House adviser.

The 65-year-old comedian and outspoken Trump supporter tweeted that Jarrett was the child of the Islamist organization Muslim Brotherhood and the film "Planet of the Apes."

"Muslim brotherhood & planet of the apes had a baby=vj," Barr wrote, using Jarrett's initials. The actress' message was in response to a tweet accusing Jarrett of covering up misdeeds for the Obama administration.

The entertainer later apologized, adding that she was "leaving Twitter" following the harsh criticism she received for the remark.

But ABC quickly moved to cancel the show.

"Roseanne's Twitter statement is abhorrent, repugnant and inconsistent with our values, and we have decided to cancel her show," ABC Entertainment President Channing Dungey announced on Tuesday afternoon.

Barr was also dropped by her talent agency, ICM Partners, shortly after ABC canceled her show.

"We are all greatly distressed by the disgraceful and unacceptable tweet from Roseanne Barr this morning," ICM said in a statement Tuesday, according to Variety.

"What she wrote is antithetical to our core values, both as individuals and as an agency. Consequently, we have notified her that we will not represent her. Effective immediately, Roseanne Barr is no longer a client."