WASHINGTON (Reuters) - U.S. President Donald Trump faced scathing criticism on Thursday for an advertisement linking Democrats and immigrants to violent crime, as Democrats and some of his fellow Republicans blasting it as the most racially divisive political ad in three decades.

The online ad features courtroom footage of Luis Bracamontes, an illegal immigrant from Mexico convicted in the 2014 killings of two police officers in Sacramento, California. It cuts between those clips and scenes of migrants, likely a reference to a caravan of up to 3,000 Central Americans headed through southern Mexico en route to the U.S. border.

“Who else would Democrats let in?” asks the ad, which Trump tweeted late on Wednesday. The ad ends with the tag: “President Donald J. Trump and Republicans are making America Safe Again!,” a play on Trump’s “Make America Great Again” slogan.

Trump’s presidential re-election campaign paid for the ad, U.S. news media reported. The campaign did not immediately respond to a request for comment.

Democratic National Committee Chairman Tom Perez characterized the ad as “distracting, divisive Donald at his worst.” In an interview with CNN, Perez described the ad as “fear-mongering.”

Trump, whose administration takes a hard-line approach to legal and illegal immigration, has focused on the caravan to drum up support for Republican congressional and gubernatorial candidates ahead of Tuesday’s congressional elections.

But even some Republicans criticized his message.

“You are a despicable divider; the worse social poison to afflict our country in decades,” Al Cardenas, the Florida Republican Party’s former chairman, said on Twitter. “This ad, and your full approval of it, will condemn you and your bigoted legacy forever in the annals of America’s history books.”

Democrats are generally favored to win the 23 seats they need to gain a majority in the U.S. House of Representatives, an advantage they could use to block Trump’s agenda. Republicans have a stronger chance of keeping control of the Senate, according to opinion polls and nonpartisan forecasters.

Some Democrats, including Robert Reich, who served as secretary of labor in the Clinton administration, compared the spot to the 1988 “Willie Horton” ad, which supporters of Republican then-candidate George H.W. Bush used to great effect against Democratic rival Michael Dukakis.

Horton was a convicted murderer who went on a crime spree while on furlough from prison under a program supported by Dukakis, then governor of Massachusetts. The ad was widely criticized for emphasizing that Horton was black.

“This may be the most desperate and vile ad since Willie Horton,” Reich said on Twitter. “They’ve resorted to fearmongering.”

It is not the first time that Trump has used Bracamontes in a political ad. The man also featured in a January video tied to the anniversary of Trump’s Jan. 20, 2017, inauguration.

All Reuters election coverage here