Pete Buttigieg used a nationally televised Fox News town hall on Sunday night to blast a pair of the network's most prominent hosts.

Buttigieg, who came under fire from the progressive wing of the Democratic Party for taking part in the Fox News event in Claremont, N.H., took direct aim at the network watched closely by President Donald Trump and other conservatives.

"A lot of people in my party were critical of me doing this, and I get where that's coming from, especially when you see what goes on with some of the opinion hosts on this network," Buttigieg told Fox News host Chris Wallace.

Buttigieg cited "Tucker Carlson saying immigrants make America dirty" and "Laura Ingraham comparing detention centers with children in cages to summer camps." Wallace did not address Buttigieg's attacks on the two hosts.

Carlson and Ingraham both host primetime shows on Fox News and have stirred controversy with their comments. Carlson, in December, said allowing in immigrants" makes our own country poor and dirtier and more divided." Ingraham, in June, said immigrant child detention centers were "essentially summer camps."

"There's a reason anybody has to swallow hard and think twice before participating in this media ecosystem," Buttigieg said. "But I also believe that even though some of those hosts are not always there in good faith, I think a lot of people tune into this network who do it in good faith."

"And there are a lot of Americans who my party can't blame if they are ignoring our message, because they will never hear it if we don't go on and talk about it," he continued, adding that "we have to find people where they are, not change our values, but update our vocabulary so that we're truly connecting with Americans coast to coast."

Buttigieg was very well received by the Fox News town hall audience and his comments prompted repeated enthusiastic applause.

He faced criticism from some on the left for participating in the town hall, particularly after Sen. Elizabeth Warren, D-Mass., turned down an invite from Fox, saying last week that she was a "hard pass" on doing an event on the network, which she slammed as a "hate-for-profit racket that gives a megaphone to racists and conspiracists."

Earlier this year, the Democratic National Committee also announced it was boycotting Fox News as a potential primary debate partner.

At the town hall, Buttigieg was asked about Trump's tweets criticizing and demeaning him as looking like the Mad magazine cartoon figure Alfred E. Newman.

"The tweets are — I don't care," Buttigieg said, prompting raucous applause.

He added that they were "mesmerizing," and that "it's hard for any one to look away — me too."

"It is the nature of grotesque things that you can't look away," Buttigieg quipped.

His assessment of Trump’s social media habits came just hours after the president, ahead of the event, took to Twitter to insult the midwestern mayor, as well as the network holding the town hall.

Hard to believe that @FoxNews is wasting airtime on Mayor Pete, as Chris Wallace likes to call him. Fox is moving more and more to the losing (wrong) side in covering the Dems. They got dumped from the Democrats boring debates, and they just want in. They forgot the people..... — Donald J. Trump (@realDonaldTrump) May 19, 2019

....who got them there. Chris Wallace said, “I actually think, whether you like his opinions or not, that Mayor Pete has a lot of substance...fascinating biography.” Gee, he never speaks well of me - I like Mike Wallace better...and Alfred E. Newman will never be President! — Donald J. Trump (@realDonaldTrump) May 19, 2019

"Hard to believe that @FoxNews is wasting airtime on Mayor Pete, as Chris Wallace likes to call him. Fox is moving more and more to the losing (wrong) side in covering the Dems," Trump said.

"Chris Wallace said, 'I actually think, whether you like his opinions or not, that Mayor Pete has a lot of substance...fascinating biography.' Gee, he never speaks well of me — I like Mike Wallace better," Trump added, referring to the anchor's father."

"And Alfred E. Newman will never be President!" Trump wrote.

Moments after the town hall ended, veteran Fox News journalist Brit Hume slammed Trump for "barely" facing interviews from reporters like Wallace, while lauding Buttigieg for doing so.

"Say this for Buttigieg," Hume tweeted. "He’s willing to be questioned by Chris Wallace, something you've barely done since you've been president."