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.