NEW YORK — On election night at Fox News Channel, big red news alerts lit up the small courtyard outside Studio F where Bret Baier and Martha MacCallum were hosting the channel’s midterms coverage.

The rain had just let up and Baier, the channel’s chief political anchor, sat square-jawed and sober, resembling a Dick Tracy cartoon without the hat. MacCallum, a new presence as an election-night co-anchor (for the 2016 presidential election, Megyn Kelly was in that seat) appeared sharp in a suffragist-appropriate white jumpsuit with perfectly arranged blond hair.

This was supposed to be Fox News’s star turn — the big day for its journalists. Instead, the previous 24 hours had exposed the spreading fissures at Fox News, which is in the midst of its own version of a civil war, pitting its news anchors against its big-name pundits, who are avid promoters of President Trump. Baier, who has been at Fox for 21 years, says he approaches every day “with horse blinders on.”

“I don’t spend a lot of time analyzing what the opinion shows are doing,” he adds, but it was impossible to ignore Sean Hannity’s guest appearance at President Trump’s final midterm-elections rally in Missouri.

Before the rally, Hannity had said he would only be interviewing Trump and wouldn’t appear on stage. But after the interview, Hannity did exactly what he said he was not going to do, which was jump onstage, hug Trump, repeat his campaign talking points, and then high-five former Fox News executive Bill Shine, who is now the White House deputy chief of staff in charge of communications.

Hannity later said Trump’s invitation to join him on stage was unexpected, which many at the channel disbelieved. “You know he’s lying through his teeth, right?” said one current Fox News staffer, who spoke on the condition of anonymity to talk candidly. Hannity maintained on his show after election night that “he had no idea” that the president was going to invite him up there.

Hannity’s decision to bound up on stage effectively made him a part of the Trump campaign and further wed the channel and the president. And, like any married couple, Fox News and the White House have started to resemble one another. The West Wing contains various factions; so does Fox. Baier and MacCallum are like Jared Kushner and Ivanka Trump, projecting a reasonable mien and moderate opinions, while Hannity and others lean toward the extremes.

The day before the midterm elections, Rupert Murdoch, whose family controls the company that owns Fox News, stopped by Baier and MacCallum’s practice session. “Rupert is at heart a newsman, and he likes to know what is going on,” Baier said in an interview.

The Murdoch family has its factions, too. Hollywood spotlights circled outside and occasionally highlighted the office tower from which Murdoch and his son, Lachlan, watched the channel’s coverage with a small gathering of senior staff. James Murdoch, who has told friends he is embarrassed by much of what appears on Fox News, did not attend.

As the network prepares for the 2020 presidential campaign the question is: Will Fox survive as a house united?

Sean Hannity of Fox News speaks at a campaign rally on the eve of the midterm elections. (Carlos Barria/Reuters)

Baier and his news colleagueshave long been overshadowed by the opinion hosts at Fox News, who have most often gotten the prime-time slots and biggest ratings. Hannity's ascent to star of the most-watched show on cable news came only after the departure of Bill O'Reilly (because of a sexual harassment scandal) and Megyn Kelly, who left Fox in early 2017 for a short-lived morning show on NBC News. Perhaps not coincidentally, Hannity's ascent occurred during the first year of Donald Trump's presidency.

Hannity’s show “Hannity” averaged over 3.5 million viewers in October, with Baier’s show, “Special Report with Bret Baier” clocking an average of 2.7 million viewers, and MacCallum’s “The Story with Martha MacCallum” averaging 2.5 million, according to Nielsen Media Research.

Election-night coverage was seen as an important moment for Baier and MacCallum to showcase their straightforward style and set them and their news colleagues apart from the image of Fox News that is so tied to Donald Trump and decried by critics as state TV.

For election night 2018, Fox News built an outdoor studio plus three large screens that broadcast the coverage from the main anchor desks inside. The last element of the Fox Election Experience was a promotional tent for Fox Nation, the streaming service that Fox News plans to launch late this month for its self-proclaimed “superfans.” A sign welcomed visitors: “Feeling Left Out? Join Fox Nation.”

Fox News alerts about the win by Sen. Elizabeth Warren (D-Mass.) garnered boos from the crowd in the courtyard, as did Florida gubernatorial hopeful Andrew Gillum’s early lead. When Republican Ron DeSantis pulled ahead later, the crowd whooped. When a photo of Sen. Amy Klobuchar (D-Minn.) appeared on the large screen outside Studio F, a man draped in a U.S. flag yelled “Anti-American!”

Inside the main studio, Baier and MacCallum played it straight. They left it to Laura Ingraham, who has mocked Parkland survivor David Hogg and compared immigrant detention facilities to “summer camp,” to argue that Trump deserved more credit for helping Republicans maintain control of the Senate.

There were moments in the evening when it felt as if Ingraham might have been more comfortable cheering outside, alongside Aimee Cabo and her husband. They were visiting from Miami. Cabo enthused about Trump rallies: “I love watching them,” she said. Cabo added that she also loved parts but not all of Fox News.

“I love ‘Fox & Friends’ and anything after 5 p.m.,” Cabo said. “Anything in between, they are more Democrat than Republican.”

The divide inside Fox had been on display in the weeks leading up to the midterm elections. Parroting Trump’s hyped-up rhetoric of a dangerous and imminent migrant “invasion,” Jeanine Pirro, Brian Kilmeade and other Fox contributors imagined the migrants wandering through Mexico as a group preparing to charge the border and bringing diseases, wife beaters and maybe even pedophiles to the United States.

It fell to Shepard Smith, Fox’s chief news anchor, to level with viewers at the end of October that the migrants, if they arrived at the U.S. border at all, were two months away. “There is no invasion. No one is coming to get you,” he soberly told the camera. “There is nothing at all to worry about.”

It's hard to know how Ailes, who was ousted in 2016 in a sexual harassment scandal and who died in 2017, would have handled Trump and Hannity's bond. When he was alive, Ailes gave Trump a platform as a birther conspiracy theorist on "Fox & Friends" but didn't like Trump as a political candidate, former associates say. Ailes did not want a single individual in the GOP to dictate Fox News's coverage; he wanted to run the GOP. Some former Fox News executives see the network's alignment with Trump, as well as its inability to control Hannity, as a sign of how Ailes managed to keep major stars in line.

“When I left Fox, nobody inside there liked Trump,” said Eric Bolling, former co-host of the Fox News show “The Five.” “Now, look at it. Everyone is falling into line.”

When Trump declared his candidacy, divisions inside the network played out on camera. Dana Perino, a former press secretary for George W. Bush, was dubbed one of the “Bushies,” and Greg Gutfeld, another co-host of “The Five,” regularly attacked Trump on air. Other Fox personalities, including Bolling himself, Kimberly Guilfoyle and Hannity were pro-Trump from the start.

Bolling and Guilfoyle have left the network. (Guilfoyle is dating the president’s son Donald Trump Jr.) Today, both Perino, who has been given her own 2 p.m. news show, and Gutfeld are quieter in their objections.

The pro-Trump posture of Fox News alienated some contributors. Ralph Peters, a longtime military analyst for the channel, severed his association with Fox months ago and said in an interview that the network divides itself into three categories: the true believers who see Trump as “the new messiah;” the cable news opportunists, who have fallen into line; and the respectable hosts who are “disgusted by what goes on there.” But the distinction between opinion and programming hosts is meaningless these days, he says: “It’s like saying, ‘I’m only a prostitute from noon to midnight.’ ”

Baier hardly appears disgusted — “Fox News is a great place to work,” he says — but finds himself in a news environment dominated by the president and the conspiracy theories sometimes created by his colleagues. He tries to keep his show at least partly away from Trump news. “I think that’s one of our problems as an industry overall. President Trump is brilliant at that. He controls the media, and he’s in the conversation, and he’s on the front page every day.”

The New Yorker’s Ken Auletta noted recently in a conversation at Advertising Week New York that Baier’s show is more expansive than the average. “ I get more news about the Middle East on Bret Baier at six o’clock than I do at CNN.”

Shepard Smith, Fox’s chief news anchor, leveled with viewers about President Trump’s talk of a migrant “invasion.” The migrants, if they arrived at the U.S. border at all, were two months away. “There is no invasion. No one is coming to get you,” he soberly told the camera. (Richard Drew/Associated Press)

After Hannity's onstage appearance with Trump, Baier said that "there was a lot of reaction inside the company," and that he, MacCallum, Brit Hume and Chris Wallace addressed it at a pre-scheduled lunch with Fox News chief executive Suzanne Scott and Fox News President Jay Wallace the day of the election.

“It was a big part of the discussion,” Baier said. Wallace and Scott told them the Murdochs had been personally involved in the statement that Fox News put out that morning expressing disapproval of Hannity’s action. “We felt confident that they understood the seriousness of the moment, and that the news side needed to make sure [management] had our backs. . . . I do something different than Sean does, but when an event like this happens, it needs to be clear cut.”

After that, Baier had what he called “a good conversation” with Hannity. The two men have been with Fox News from the beginning and have known one another for 21 years. Still, the whole thing was “a huge distraction from what was a huge night.”

The whole thing didn’t hurt ratings. As it has been for years, Fox News was the highest-rated news program on election night, beating both cable and network news programs with 7.8 million prime-time viewers, according to Nielsen.

As for Rupert and Lachlan Murdoch, they were “disappointed and felt strongly about reassuring the journalists at Fox News” that what Hannity did “is not acceptable,” according to a person close to them. Disappointed or not, the Murdochs and Fox News are at the mercy of Trump and Hannity, at least for now. “They’re willing to support Sean in the short term but Sean’s key to survival now is the connection to the Trump base and voter,” said a Trump administration official close to the network. Lachlan Murdoch recently said that he wasn’t embarrassed by what is on Fox News and that more people watch the channel’s news coverage than its opinion programming.

Hannity has flirted with other political figures. He was due to appear at a 2010 Cincinnati fundraiser for the tea party when Ailes angrily called him home before he could participate. This time, with the Missouri rally, there was no one to call him back before it was too late. “Hannity is really pushing the envelope,” said a former Fox executive. “He’s daring people to try to stop him.”

Sarah EllisonSarah Ellison is a staff writer based in New York for The Washington Post. Previously, she wrote for Vanity Fair, the Wall Street Journal and Newsweek, where she started as a news assistant in Paris. Follow