NBC, Fox News and Facebook have pulled an ad by US President Donald Trump’s campaign that critics had labelled racist, as a bitter election fight for control of the US Congress heads for an unpredictable finish.

Today's vote, widely seen as a referendum on Mr Trump’s presidency, has been portrayed by both Republicans and Democrats as critical for the direction of the country.

At stake is control of both chambers of Congress, and with it the ability to block or promote Mr Trump’s political agenda, as well as 36 governor’s offices.

A surge in early voting, fuelled by a focus on Mr Trump’s pugilistic, norms-breaking presidency by supporters of both parties, could signal the highest turnout in 50 years for a midterm US election, when the White House is not on the line.

The 30-second ad, which was sponsored by Trump’s 2020 re-election campaign and which debuted online last week, featured courtroom video of an illegal immigrant from Mexico convicted in the 2014 killings of two police officers, juxtaposed with scenes of migrants headed through Mexico.

Critics, including members of President Trump’s own party, had condemned it as racially divisive.

CNN had refused to run the ad, saying it was "racist".

NBC, owned by Comcast Corp, said yesterday that it was no longer running the ad, which it called "insensitive".

Fox News Channel, which Mr Trump has repeatedly named his favourite broadcaster, also said it would no longer run the ad.

Fox News, a unit of 21st Century Fox, said it had made the decision after a review but did not elaborate.

Facebook said it would no longer allow paid promotions of the ad, although it would allow users to share the ad on their own pages.

Mr Trump batted away reporters' questions about the networks’ decision to drop the ad.

"You’re telling me something I don’t know about. We have a lot of ads, and they certainly are effective based on the numbers we’re seeing," Mr Trump said as he departed Joint Base Andrews in Maryland for a rally in Cleveland.

Rhianna issues legal warning over Trump using her music

Rihanna has issued a cease-and-desist letter ordering Mr Trump not to play her music at his rallies.

The pop star was alerted via Twitter that her 2007 hit 'Don't Stop The Music' was played at an event in Chattanooga, Tennessee, on Sunday.

Rihanna called Mr Trump's rallies "tragic" and said he would not be using her music "for much longer".

Her legal team has now sent an official letter to the White House.

The document states: "It has come to our attention that President Trump has utilised (Rihanna's) musical compositions and master recordings, including her hit track 'Don't Stop The Music', in connection with a number of political events held across the United States."

It then references Rihanna's surname, Fenty, and says she has not given Mr Trump permission to use her music.

It adds: "Such use is therefore improper. Trump's unauthorised use of Ms Fenty's music creates a false impression that Ms Fenty is affiliated with, connected to or otherwise associated with Trump."

Ahead of today's midterm elections, Rihanna has endorsed Andrew Gillum, the Democratic candidate for the governor of Florida and told her 66 million Instagram followers they could "make history" in the election.

Rihanna is the latest celebrity to object to Mr Trump using their music.

Last week, rapper and producer Pharrell Williams issued a cease-and-desist notice after the president played his song 'Happy' hours after a mass shooting at a synagogue.

Last month, Prince's estate warned Mr Trump about playing the late pop star's hit 'Purple Rain' at his rallies.

Aerosmith frontman Steven Tyler filed a cease-and-desist letter after the president played his song 'Livin' On The Edge' at a rally.

The Rolling Stones also took issue with Mr Trump using their music after he played 'Start Me Up' at an event.

Facebook removes 115 accounts on eve of midterms

Meanwhile, Facebook said it had blocked some 30 accounts on its platform and 85 accounts on photo-sharing social network Instagram over concerns they may be linked to foreign entities and aimed at interfering in the midterm elections.

The announcement came shortly after US law enforcement and intelligence agencies said they had no indication of efforts to disrupt election infrastructure but that Americans should be wary of Russian attempts to spread fake news.

A study published last week found that misinformation on social media was spreading at a greater rate than during the run-up to the 2016 presidential vote, which Russia is accused of manipulating through a vast propaganda campaign in favour of Mr Trump, the eventual winner.

"On Sunday evening, US law enforcement contacted us about online activity that they recently discovered and which they believe may be linked to foreign entities," Facebook said in a blog post.

"Our very early-stage investigation has so far identified around 30 Facebook accounts and 85 Instagram accounts that may be engaged in coordinated inauthentic behavior. 

"We immediately blocked these accounts and are now investigating them in more detail."

It added all the Facebook pages associated with the accounts appeared to be in French or Russian languages. 

The Instagram accounts were mostly in English, with some "focused on celebrities, others political debate".

"Typically, we would be further along with our analysis before announcing anything publicly. But given that we are only one day away from important elections in the US, we wanted to let people know about the action we've taken and the facts as we know them today," Facebook added.