President Donald Trump appeared unhappy with Fox News, his favorite TV network, for hosting a town hall with the Democratic presidential hopeful Pete Buttigieg on Sunday night.

Trump said Fox News "forgot the people who got them there" and was "wasting airtime."

At the town hall in Claremont, New Hampshire, Buttigieg was asked about Trump's tweets by the host Chris Wallace, and replied: "The tweets are — I don't care."

Buttigieg promised tax hikes on higher earners and made a pitch for his 2020 candidacy. He also attacked the Fox hosts Tucker Carlson and Laura Ingraham for their coverage of migrants.

Trump ended up appearing on Steve Hilton's Fox News show in a prerecorded segment a few hours after the Buttigieg town hall ended.

Visit Business Insider's homepage for more stories.

President Donald Trump berated Fox News, his favorite TV network, on Sunday for hosting a town hall with the 2020 Democratic presidential candidate Pete Buttigieg, who went on to receive a standing ovation from a New Hampshire crowd.

"Hard to believe that @FoxNews is wasting airtime on Mayor Pete, as Chris Wallace likes to call him," Trump, a frequent Fox viewer who is a close ally of senior network personalities, tweeted on Sunday.

"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 who got them there."

Buttigieg at the town hall in Claremont, New Hampshire, on Sunday. Fox News

Read more: 'Boot-EDGE-EDGE': Trump tries to pronounce 2020 Democratic candidate Pete Buttigieg's name at Florida rally

Buttigieg spoke with the Fox News host Chris Wallace in Claremont, New Hampshire, on Sunday, a few hours after Trump tweeted his disapproval.

When the interview and Q&A finished, the audience members got to their feet and applauded the Democratic candidate, who is mayor of South Bend, Indiana.

Wallace, looking around the room, commented: "Wow, a standing ovation."

During the broadcast Wallace asked Buttigieg about Trump's Twitter outburst.

Buttigieg beside his husband, Chasten Glezman, at the West Side Democratic Club during a Dyngus Day celebration event on April 22 in South Bend, Indiana. Kamil Krzaczynski/AFP/Getty Images

"The tweets are — I don't care," Buttigieg replied.

He did acknowledge that it was "hard for anyone to look away" when Trump tweeted, adding that "it is the nature of grotesque things that you can't look away."

Trump also reprimanded Wallace in a second tweet.

Buttigieg speaking with Chris Wallace on Fox News on Sunday. Fox News

"Gee, he never speaks well of me - I like Mike Wallace better...and Alfred E. Newman will never be President!"

(In the past Trump has compared Buttigieg to the Alfred E. Neuman, a cartoon character from "Mad" magazine also known as "idiot kid.")

While appearing on Fox, Buttigieg took issue with the prime-time Fox hosts Tucker Carlson and Laura Ingraham, who were not at the event.

He denounced Carlson for "saying immigrants make America dirty," and Ingraham for "comparing detention centers with children in cages to summer camps."

South Bend Mayor Pete Buttigieg AP Photo/Darron Cummings

Perhaps ironically considering his apparent annoyance, Trump appeared on Fox News with Steve Hilton later Sunday night in an interview recorded last week in which he was asked what he thought of Buttigieg's candidacy.

"I think it's good," Trump said. "I think he runs a city that doesn't do perfectly, and I think he's had — you know, it's sort of interesting because he's running for the president of the United States as a mayor."

The crowded field of Democratic presidential candidates has been torn on whether to participate in town halls on Fox News given the network's warm relationship to the White House and the spread of misinformation by some of its hosts, a tension Buttigieg noted on Sunday.

"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," he told Wallace.

Sen. Elizabeth Warren refused an invitation to a Fox News town-hall event and called Fox News a "hate-for-profit racket that gives a megaphone to racists and conspiracists."

Read more: Paul Rudd played an unrelatable Pete Buttigieg visiting 'The View' on 'SNL'

On March 6, the Democratic National Committee said it would not be partnering with Fox News for any 2020 debates.

"There's a reason anybody has to swallow hard and think twice before participating in this media ecosystem," Buttigieg told Wallace.

"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."