NBC has pulled an episode of Law & Order: SVU, which stars Mariska Hargitay (pictured) inspired by Donald Trump that was to have aired two weeks before the US election.

An episode of Law & Order: Special Victims Unit inspired by Donald Trump will not air before the election as planned, reports Variety.

The episode, which stars Gary Cole (Veep, The Good Wife, Suits) as a "brash demagogue with political ambitions", was to have aired two weeks before the November 8 election in the US.

Law & Order: SVU is made by NBC, the network that also airs Access Hollywood, from which the 2005 footage of Trump talking about touching women without their consent was taken.

NBC says they decided to delay airing the episode after the recent allegations of sexual assault emerged. Eight women have accused Trump of sexual assault, including Summer Zervos, who was a contestant on NBC's The Apprentice, on which Trump also appeared. Trump has denied the allegations.

READ MORE:

* 'Law & Order: SVU' to air a Donald Trump-themed episode titled 'Unstoppable'

* Steven Hill, who played Law & Order DA Schiff, dies at 94

* Trump tapes: Apprentice producer pressured to release footage amid Trump 'N-word' claims

The SVU episode, called Unstoppable, was written some time ago by showrunner Rick Eid and writer Julie Martin. The script was vetted by Law & Order production company, Wolf Entertainment and NBC, and modifications to soften the character were questioned by some castm embers who have been open on social media about their dislike of Trump.

Parts of the story are believed to have been inspired by a pending civil lawsuit in New York by a woman who alleges Trump raped her when she was 13 in the mid-'90s.Trump's attorneys have vehemently denied the allegations.

The Law & Order franchise is famous for finding inspiration in real-life news events. SVU has loosely based stories on real life cases such as the Elizabeth Smart kidnapping and Andrew Luster, the heir to the Max Factor fortune who was convicted of multiple sexual assaults. The current season opened with an episode loosely inspired by last year's shootings in San Bernardino, California.

Production on the episode was completed a month ago. No new air date has been confirmed.