“I think he’s a person I know well,” Mr. Trump said. “He is a good person.”
The president is a well-documented fan of Fox News, sitting for interviews with its prime-time hosts and conferring privately by phone with Rupert Murdoch, the network’s executive chairman.
Mr. Trump has bragged to associates that he now refers to Mr. Murdoch, one of the world’s most powerful media moguls, by his first name, according to a person who is friendly with both men.
But the president has a particular rapport with Mr. O’Reilly, whose hectoring braggadocio and no-apologies nostalgia for a bygone American era mirror Mr. Trump’s own.
A regular guest on “The O’Reilly Factor,” Mr. Trump has attended baseball games with Mr. O’Reilly, praised his collection of best-selling political books, and, as president-elect, granted him a prominent interview that aired during Fox’s Super Bowl pregame show. The men share a taste for vanilla milkshakes, bantering on-air about how many of the confections Mr. O’Reilly has bought for his friend.
The two have something more ominous in common, too: Each has been accused by women of sexual harassment and inappropriate behavior. Like the president, Mr. O’Reilly maintains that the accusations against him are without merit.
When damaging video footage of Mr. Trump bragging about sexual assault surfaced during the campaign, Mr. Trump called it “locker room talk” and apologized for the remarks. Mr. O’Reilly, on air that evening, allowed that the tape was “an embarrassment” for the Republican nominee. But he also criticized The Washington Post, the newspaper that published the footage.
It is remarkable for a sitting president to weigh in on sexual harassment allegations from the Oval Office, especially allegations at the center of a churning controversy. But Mr. Trump’s advice to his friend on Wednesday — that Mr. O’Reilly “shouldn’t have settled” — was consistent with the never-back-down ethos of a president, and former real estate magnate, who relishes the counterattack.
It also hinted at a deeper symbiosis between the White House and Fox News. Mr. Trump often praises the network, recently urging his 27 million Twitter followers to tune in for a Saturday evening show; last month, the president cited a Fox commentator, Andrew Napolitano, as backup for an unproven allegation that British intelligence spied on his campaign.
In turn, Fox News’s prime time and morning hosts are blatant champions of the administration — to the extent that NBC News’s chairman, Andrew Lack, recently compared the network to “state broadcasting.”
The president and Mr. Murdoch have drawn closer, too. Mr. Murdoch, a savvy political observer, deepened their relationship in the months after Mr. Trump clinched the Republican nomination, and people who know them say the two now speak frequently.
Mr. Murdoch’s former wife, Wendi Deng, is so close with Ivanka Trump that the president’s daughter became a trustee of the Murdoch children’s fortune. (Ms. Trump stepped down from the role in December.)
Mr. Murdoch, meanwhile, had mentored Ms. Trump’s future husband, Jared Kushner, in the art of media moguldom after his purchase of The New York Observer in 2006. Mr. Kushner, now a powerful White House aide, would later serve as Mr. Murdoch’s chief conduit to Mr. Trump’s campaign.
These entwinements have fueled intrigue about how the president might influence Mr. Murdoch’s corporate interests. Mr. Trump now oversees the Justice Department, just as Fox News faces an investigation by the United States attorney’s office in Manhattan over its handling of financial settlements for harassment claims.
Mr. Murdoch’s entertainment conglomerate, 21st Century Fox, is also closing in on a coveted prize in Europe, the British satellite television giant Sky. But British regulators are scrutinizing the potential acquisition, and the firestorm around Mr. O’Reilly may speak poorly of the corporate culture over which Mr. Murdoch presides.
Fox News has often provided cover for Mr. Trump as the president navigated a host of early controversies. Mr. Trump’s kind words for Mr. O’Reilly on Wednesday seemed a reciprocal gesture of sorts, from a leader who values loyalty.