Fox News host Bill O'Reilly apologized Tuesday after coming under fire for mocking a black congresswoman's hair.

During an appearance on "Fox & Friends," O'Reilly reacted to a clip of Rep. Maxine Waters (D-CA) delivering a speech on the floor of the House of Representatives.

"I didn't hear a word she said," O'Reilly said of Waters. "I was looking at the James Brown wig."

"If we have a picture of James Brown -- it's the same wig," he added.

The remarks were widely denounced as both racist and sexist on Twitter, where O'Reilly's name was trending Tuesday morning and afternoon.

Related: Conservative media at a crossroads early in Trump era

In a statement Tuesday afternoon, O'Reilly expressed regret for the remarks.

"As I have said many times, I respect Congresswoman Maxine Waters for being sincere in her beliefs," he said. "I said that again today on Fox & Friends calling her 'old school.' Unfortunately, I also made a jest about her hair which was dumb. I apologize."

The top rated host on cable news, O'Reilly actually drew some pushback before he even left the "Fox & Friends" set.

While one of the program's male co-hosts, Brian Kilmeade, laughed heartily at O'Reilly's comment, the lone female host -- Ainsley Earhardt -- stepped in to back Waters.

"I have to defend her on that," Earhardt said. "You can't go after a woman's looks. I think she's very attractive."

"I didn't say she wasn't attractive," O'Reilly said. "I love James Brown. But it's the same hair!"

He later called Waters a "sincere individual" and said she should be commended for speaking her mind.

"Whatever she says she believes," O'Reilly said. "She's not a phony, and that's old school."

Related: The Wall Street Journal and Trump: a history of hostility

The congresswoman's office declined to comment.

As clips of O'Reilly's remarks made the rounds online, some media watchdogs noted that Waters found herself on the receiving end of another racially charged remark from a different Fox News personality years earlier.

In 2012, Fox host Eric Bolling said that Waters should "step away from the crack pipe."

O'Reilly himself has faced charges of racism and sexism in the past. And in his bid for laughs, he has been known to crack wise about the physical appearance of some high-profile women.

At a comedy program in Long Island in 2015, O'Reilly made fun of the weight of both Rosie O'Donnell and Hillary Clinton.

In his joke about the former secretary of state, O'Reilly imagined a farcical scenario wherein the Clinton Foundation was forced to return thousands of pantsuits to the Chinese government.

"We don't want them back,'" O'Reilly said, adopting a fake Chinese accent. "'They don't fit anyone here in this country.'"