DETROIT — Rebuffed yet again in coaxing Hillary Clinton onto Fox News, executives at the network had an outside-the-box idea last month that would have made primary debate history: a face-off between Senator Bernie Sanders of Vermont and the equally fiery candidate on the Republican side, Donald J. Trump.

The Trump campaign was initially very interested, according to Fox officials, and the Sanders campaign was on board. But before the debate could be announced, the Trump campaign pulled out, citing scheduling conflicts, so the network planned to welcome just Mr. Sanders in an hourlong town-hall-style event, hosted by Bret Baier as part of his “Special Report” program.

Late on Friday, the network received a surprise call. Mrs. Clinton would participate, ending her two-year absence from the network that her liberal base loves to criticize.

“It’s a good opportunity for us, and it’s one that I take seriously,” Mr. Baier said in an interview on Monday before the event. He would, he said, take the same tough-but-fair approach that he and his fellow moderators had brought to the Republican debates, which were well received and which some view as a reason the Democrats might have been more willing to go on the network.