Major television networks and Facebook have taken the unusual step of rejecting an inflammatory ad by President Trump’s political team that effectively closes a fiercely fought midterm campaign with a message portraying immigrants as a violent threat.
The 30-second political spot, which mirrors the president’s apocalyptic warnings about a caravan of asylum seekers in Mexico, was widely denounced as racist and misleading after Mr. Trump shared a longer version of it last week.
NBC and Facebook, both of which had run the ad over the weekend, reversed course after a backlash on Monday and announced that the commercial would be removed, saying it fell short of their in-house advertising standards. CNN had refused to air the ad from the start, calling it “racist.”
Even Fox News, which has made warnings about the migrant caravan a staple of its prime time coverage of the midterms, felt compelled to distance itself from the ad. The network’s president of ad sales, Marianne Gambelli, said in a statement that the network had stopped airing it on Sunday. “It will not appear on either Fox News Channel or Fox Business Network,” she wrote.
Mr. Trump, for his part, said he was unaware of the controversy.
“You’re telling me something I don’t know about,” he told reporters on Monday before boarding Air Force One. “We have a lot of ads, and they certainly are effective, based on the numbers that we’re seeing.”
Asked about critics who called the ad offensive, Mr. Trump replied: “A lot of things are offensive. Your questions are offensive a lot of times so, you know.”
Divisive, over-the-top political ads have been a hallmark of this year’s age-of-rage midterm battle, as candidates across the country accused their opponents of being terrorists, criminals, and in one case, deserving of a golf spike to the face.
[As the midterm elections near, read about how Trump is bringing up immigration as an issue.]
But Mr. Trump’s ad, which aired on NBC’s “Sunday Night Football,” the top-rated program, sparked a particular outcry — and a debate over the limits of paid political speech hours before voters head to the polls.
The actress Debra Messing, whose show “Will and Grace” airs on NBC, wrote on Twitter that she was “ashamed” that her network “aired this disgusting racist ad.” The film director Judd Apatow, who has made movies at NBC’s corporate sibling Universal Studios, called it “a low point in the history of NBC.”
The N.F.L. issued a statement disavowing any knowledge that the Trump commercial had been slated to run during its premiere game of the week. “The N.F.L. played no role in the airing of the spot,” a league spokesman, Brian McCarthy, said. “The N.F.L. has no approval rights regarding campaign ads.”
Supporters of Mr. Trump seized on the rejection to rally voters against news organizations and tech companies that they argue are biased against the president.
“The #FakeNewsMedia and #PaloAltoMafia are trying to control what you see and how you think,” Brad Parscale, Mr. Trump’s campaign manager, wrote on Twitter. (Mr. Parscale did not mention that Fox News had also removed the commercial from its broadcasts.)
Alex Castellanos, a Republican strategist who has advised several presidential candidates, including a group supporting Mr. Trump, said he “can’t remember an ad, ever, that was denied airtime because of its point of view, because it was called offensive or racist.”
He also said that the Trump campaign could benefit.
“The day before the election, there’s not enough time to air the ad and have it make a difference,” Mr. Castellanos said. “But if it becomes controversial, a lot of people will see it who otherwise would not.”
The rejected commercial features footage of an undocumented immigrant from Mexico, Luis Bracamontes, bragging about his murder of two California police officers in 2014. Ominous music plays, followed by images of the caravan that originated in Central America.
“Dangerous illegal criminals like cop-killer Luis Bracamontes don’t care about our laws,” the ad said. The final onscreen message: “Stop the caravan. Vote Republican.”
On Monday, NBCUniversal said that “after further review” the ad would no longer be shown because of its “insensitive nature.” The network had previously approved the ad, which aired during a matchup between the New England Patriots and the Green Bay Packers, and several times on the cable news channel MSNBC.
Facebook, which had been paid by the Donald J. Trump for President campaign to target the spot in electoral battlegrounds like Florida and Arizona, issued a similar note. “This ad violates Facebook’s advertising policy against sensational content so we are rejecting it,” a spokesman said, adding that users were still free to post the video on their personal pages.
He also features in a longer version of the ad that the president posted on Twitter last week, which falsely claimed that Democrats let him “into our country” and “let him stay.” In fact, Mr. Bracamontes had been deported during the Clinton and Bush administrations, but repeatedly made his way back.
The 53-second version, which Mr. Trump has featured atop his Twitter page, has been viewed about 6.5 million times.
CNN dedicated substantial coverage to the longer ad, with anchors and onscreen graphics declaring it misleading and “racist.” That prompted a rebuke from the president’s son, Donald Trump Jr., who told his Twitter followers that CNN “won’t talk about real threats that don’t suit their agenda.”
He added: “Remember this on Tuesday. #vote.”
Mr. Trump has made the caravan a central campaign theme, describing it as an “invasion of our country” in an effort to stoke anxieties about immigration. He has ordered more than 5,000 active-duty troops to the border in preparation for the migrants’ expected arrival in the coming weeks.
The caravan was once said to have 7,000 people, but more recent estimates put the number at fewer than 3,500.
Jason Kint, the chief executive of Digital Content Next, a trade group that represents entertainment and news organizations, said the reaction from the networks and Facebook could end up amplifying Mr. Trump’s closing argument, rather than smothering it.
Because of the controversy, he said, the ad was “spreading like wildfire — for free.”