CNN  — 

Democratic presidential candidate Pete Buttigieg used a Fox News town hall in New Hampshire on Sunday to slam two of the network’s primetime opinion hosts, knocking both Tucker Carlson and Laura Ingraham by name on the network where they each host an hour.

The moment came when the South Bend, Indiana, mayor was trying to explain why he agreed to do a town hall with Fox News, something that other Democrats – namely Massachusetts Sen. Elizabeth Warren – have said they would not do because of the network’s near constant attacks against the party, and, as Warren said, because the network has mixed “bigotry, racism, and outright lies with enough legit journalism to make the claim to advertisers that it’s a reputable news outlet.”

“There is a reason why anyone has to swallow hard and think twice about participating in this media ecosystem,” Buttigieg said after hitting Carlson for saying immigrants make the country dirty and Ingraham comparing detention centers with children to summer camps.

“Even though some of those hosts are not there in good faith, I think a lot of people tune into this network who do it in good faith,” he said, adding that Democrats “can’t blame” Fox viewers if “they are ignoring our message because they will never hear it if we don’t go on and talk about it.”

A spokeswoman for Fox News did not respond to CNN’s request for comment.

Democrats have been in the middle of a public and ongoing debate about whether 2020 candidates should agree to headline a town hall hosted by Fox News.

Warren publicly rejected an invitation to participate in a town hall on Fox News, saying the conservative network is a “hate-for-profit racket” that’s in business to harm the Democratic Party.

California Sen. Kamala Harris, too, has rejected Fox News’ offer.

“They’ve reached out but we haven’t entertained it,” a campaign spokesperson said earlier this month.

But other candidates either have agreed to headline a town hall like Buttigieg, or said they would do just that, arguing that Democrats should make appeals to Fox’s audience. Vermont Sen. Bernie Sanders headlined a Fox News town hall in April and New York Sen. Kirsten Gillibrand is slated to headline a Fox News town hall in June.

“If you’re not using your town hall, I will,” former Maryland Rep. John Delaney tweeted at Warren on Tuesday. “Democratic candidates have to campaign everywhere and talk to voters.”

The Democratic National Committee announced in March that they would not allow Fox News to host any of the Democratic debates during the 2020 cycle, arguing that President Donald Trump and the network have a mutually beneficial relationship that, in the word of DNC Chair Tom Perez, was “inappropriate.”

Buttigieg directly attacked Trump, Fox News’ most high-profile viewer, who pre-butted Buttigieg’s town hall by attacking the network for hosting the event.

“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 wrote. “They got dumped from the Democrats boring debates, and they just want in. They forgot the people who got them there.”

Buttigieg, asked by Wallace about tweets like those from Trump, responded bluntly: “I don’t care.”

“It is a very effective way to command the attention of the media. We need to make sure we are changing the channel,” Buttigieg said before admitting that he finds it hard to turn away from all that Trump does and says at times.

“It is the nature of grotesque things that you can’t look away,” he said.

Buttigieg also used the Fox News town hall to talk about his position on abortion, an issue that Wallace pressed the Indiana Democrat on.

“I trust women to draw the line when it is their own body,” Buttigieg said in response to a question about states looking to ease restrictions on abortion. When Wallace pressed Buttigieg on states that are trying to tighten abortions laws, the mayor said, “I believe that the right of a woman to make her own decisions about her own reproductive health and her own body is a national right, I believe it is an American freedom.”

Buttigieg also signaled that he was comfortable with allowing abortions in the third trimester, saying it was important to put yourself “in the shoes of a woman in that situation.”

“If it’s that late in your pregnancy, then it’s almost – by definition – you’ve been expecting to carry it to term. We’re talking about women who have perhaps chosen a name. Women who have purchased a crib and families that then get the most devastating medical news of their lifetime, something about the health or the life of the mother that forces them to make an impossible, unthinkable choice,” he said. “And the bottom line is … that decision is not going to be made any better medically or morally because the government is dictating how that decision should be made.”

UPDATE: This story has been updated with additional context around Elizabeth Warren’s position on Fox News.

CNN’s Brian Stelter and Oliver Darcy contributed to this report.