NEW YORK -- Late-night host Jimmy Kimmel apologized to those in the gay community who took offense to a joke he made in the middle of an ongoing feud with Fox News host Sean Hannity. "I most certainly did not intend to belittle or upset members of the gay community and to those who took offense, I apologize," the host of ABC's "Jimmy Kimmel Live!" said in a statement Sunday.

Kimmel had come under fire during an Twitter exchange with Hannity in which he encouraged Hannity to "get back on top." Many users called the comment homophobic.

"Stop making sh---y f----g gay jokes. Hire me to write you better gay jokes. Hire any queer person to write you literally any other jokes," one user wrote.

In his statement, Kimmel admitted he enjoyed the back-and-forth but the "level of vitriol from all sides" turned out to be harmful.

Get Breaking News Delivered to Your Inbox

The feud began last week after Kimmel made fun of first lady Melania Trump's accent when she read books to children at the White House Easter Egg Roll. Hannity attacked Kimmel on his Fox News program and vowed to keep at it until Kimmel issued the first lady an apology.

"I will take Sean Hannity at his word that he was genuinely offended by what I believed and still believe to be a harmless and silly aside referencing" Melania Trump's accent, Kimmel said in the statement. He added that he's hopeful that Hannity will "continue his newly-found advocacy for women."

On Friday, Hannity called Kimmel "Harvey Weinstein Jr." and played footage of Comedy Central's "The Man Show," that showed Kimmel asking women to find something hidden in his pants while he wore a fake erection. He also showed a clip of Kimmel in blackface, in which he imitated former NBA star Karl Malone.