CAPE GIRARDEAU, Mo. — The show onstage might well have been called Fox & Friend. As President Trump wrapped up the midterm election cycle with a late-night rally on Monday in southeast Missouri, he was joined by a trio of conservative media rock stars.

Introducing the president as he stumped for Republican candidates was Rush Limbaugh, the radio host who was born and raised in Cape Girardeau. Then after Mr. Trump took the microphone, he invited two Fox News personalities, Sean Hannity and Jeanine Pirro, to join him onstage, where each also delivered a short speech backing the president.

The participation of the Fox hosts in a political rally struck even executives at the network as inappropriate. “Fox News does not condone any talent participating in campaign events,” the network said in a statement on Tuesday. “We have an extraordinary team of journalists helming our coverage tonight, and we are extremely proud of their work. This was an unfortunate distraction and has been addressed.”

How it was addressed the network did not say. Mr. Hannity followed up with his own statement saying that Mr. Trump’s invitation to come onstage was spontaneous, but the popular conservative host expressed no regret about accepting. The only thing he lamented was that some took his onstage attack on the “fake news” at the back of the room to include his colleagues from Fox who were covering the event.

“This was NOT planned,” Mr. Hannity wrote on Twitter. “To be clear,” he added, “I was not referring to my journalist colleagues at FOX News in those remarks. They do amazing work day in and day out in a fair and balanced way and It is an honor to work with such great professionals.” Ms. Pirro did not immediately issue a statement.

The line between the Trump White House and Fox has always been a little blurry, but in that moment on Monday night at the Show Me Center at Southeast Missouri State University at least, the fusion of president and network seemed complete.

Mr. Trump has long relied on the network as his outlet of choice. His vice president, cabinet secretaries and staff members appear with great regularity. Indeed, Mr. Trump gave an interview to Mr. Hannity moments before taking the stage. “I never miss your opening monologue,” he told Mr. Hannity. “I would never do that.”

Hanging around backstage on Monday night was Bill Shine, a former Fox co-president now serving as deputy White House chief of staff in charge of communications. As the rally began, Mr. Shine and Mr. Hannity were spotted giving each other a high-five not long after the interview with Mr. Trump.

A few minutes later onstage, Mr. Trump cited Mr. Hannity to the crowd. “I was speaking to Sean Hannity backstage,” he said. “Do we love Sean?”

The audience cheered. They loved Sean.

Mr. Hannity’s role here was a surprise and yet not. On Sunday, the Trump campaign organization announced that Mr. Hannity and Mr. Limbaugh would join the president at the Cape Girardeau rally as “special guests.”

By Monday afternoon, Mr. Hannity was disputing that. “In spite of reports, I will be doing a live show from Cape Girardeau and interviewing President Trump before the rally,” he wrote on Twitter. “To be clear, I will not be on stage campaigning with the President. I am covering final rally for my show. Something I have done in every election in the past.” The Trump campaign news release was deleted from the web.

Except then he was onstage campaigning with the president. “Sean Hannity, come on up,” beseeched Mr. Trump.

Mr. Hannity climbed onto the stage and took the microphone. Referring to the news media pen in the back of the arena, Mr. Hannity echoed one of the president’s favorite lines. “By the way,” he said, “all those people in the back are fake news.” The crowd booed.

Among those people in the back was a crew from none other than Fox News with the correspondent Kristin Fisher.

Mr. Hannity expressed surprise at being asked to speak but then launched into a few lines supporting Mr. Trump. “I had no idea you were going to invite me up here,” he told the president. “And the one thing that has defined your presidency more than anything else — promises made, promises kept.”

In his statement on Tuesday, Mr. Hannity asserted that he meant it when he said before the rally that he would not be appearing onstage. “What I said in my tweet yesterday was 100% truthful,” he said. “When the POTUS invited me on stage to give a few remarks last night, I was surprised, yet honored by the president’s request.”

Video

Lachlan Murdoch, the executive chairman of 21st Century Fox, discussed the popularity of the conservative network, as well as the president’s interest in it, at the DealBook conference in New York.Published OnNov. 6, 2018

After Mr. Hannity’s short remarks, Mr. Trump introduced Ms. Pirro, who he said “treats us very, very well” and “has got viewership like you wouldn’t believe.”

Ms. Pirro offered her own endorsement of the president from the stage. “Do you like the fact that this man is the tip of the spear who goes out there every day and fights for us?” she asked the enthusiastic crowd. “If you like the America that he is making now, you’ve got to make sure you get out there tomorrow.”

Mr. Trump thanked her. “Jeanine has been a great, great friend to all of us,” he said.

In addition to the two Fox stars, Mr. Limbaugh got top billing. A Cape Girardeau native, he remains an important figure in this town on the Mississippi River. A road near the airport is named after him, and the federal courthouse in town is named after his grandfather. A large sign marking the headquarters of the Limbaugh Firm on one building is hard to miss.

Tourists are offered a self-guided tour of the landmarks of Mr. Limbaugh’s life, from the house where he grew up and the school that he attended to the barber shop where he shined shoes and the local radio station where he got his start.

“Donald Trump doesn’t need any of the grief he gets,” Mr. Limbaugh said. “He doesn’t need this. He doesn’t need to put up with the abuse. But he does. He does because he sincerely believes America’s heading on the wrong track.”

Mr. Limbaugh expressed no qualms about being a participant. “You know, I’ve sworn off of these kinds of things some time ago, but they asked — they were very persuasive — and I’m actually thrilled to be there,” he told listeners before the event.

The conservative media figures were featured prominently at the start of the rally. By contrast, Josh Hawley, the Republican candidate for Senate whose campaign was the ostensible purpose of the rally, was not called to the stage until an hour and six minutes after Mr. Limbaugh first took the microphone to get the show started. Mr. Hawley was given five minutes to speak; Mr. Limbaugh got 10.

While news reporters are generally barred from participating in partisan events, the cross-pollination between the political and the opinion media worlds has only grown in recent years. Partisan figures are hired as network commentators even as they continue to interact with their side of the aisle.

When Glenn Beck was still at Fox during Barack Obama’s presidency, he helped sponsor a Tea Party rally in Washington to protest White House policies. During the 2016 campaign, CNN severed ties with Donna Brazile, a Democratic strategist, after it was revealed that she shared questions for CNN-sponsored candidate events in advance with friends on Hillary Clinton’s campaign.

Even so, it is unusual for full-time media commentators to cross the line to directly participate in political rallies. Indeed, when Mr. Hannity planned to attend a Tea Party rally in 2010, Fox pulled the plug. “I don’t think we should be supporting the Tea Party or any other party,” Rupert Murdoch, the founder of Fox News, said at the time.

But as Mr. Trump emerged on the presidential scene before the 2016 election, Mr. Hannity, for one, made no secret of their friendship. “I’m not hiding the fact that I want Donald Trump to be the next president of the United States,” Mr. Hannity told The New York Times in 2016. “I never claimed to be a journalist.”

Mr. Trump is happy to embrace Mr. Hannity and Fox. At other campaign rallies this fall, he gave shout-outs to Fox News personalities by name, finding that to be a reliable applause line with his supporters.

“Laura — how good has Laura been, right?” he went on, referring to Laura Ingraham.

The crowd cheered some more.

“We got a lot of good people,” he said. “Do we like Tucker?” he asked, meaning Tucker Carlson. “I like Tucker.”

The crowd applauded its agreement.

He was not finished yet. “How about Steve Doocy?” he asked. “How about Ainsley, Brian?” That would be Ainsley Earhardt and Brian Kilmeade, hosts along with Mr. Doocy of “Fox & Friends,” which the president watches regularly in the morning.

As Mr. Trump concluded at the Iowa event, “We got a lot of great friends.”

Correction:

An earlier version of this article misidentified the location of Cape Girardeau. It is in southeastern Missouri, not the southwestern part of the state.