Donald Trump campaign’s demand for polling station records denied after it alleged people voted after deadline passed.

Donald Trump’s request for voting records from a Las Vegas polling station has been rejected after his campaign alleged it allowed people to vote after a deadline passed last week.

Nevada Judge Gloria Sturman at the Clark County Court said on Tuesday the request would potentially make public the identities of poll workers, which could put them at risk of harassment.

“I am not going to expose people doing their civic duty helping their fellow citizens vote … to public attention, ridicule, and harassment,” Sturman said, before commanding Trump’s lawyer to “sit down”.

Sturman also said she was concerned that presenting the polling place records to Trump’s lawyers may reveal which candidate was chosen by particular voters.

READ MORE: Clinton vs Trump – States to watch on November 8

The judge said she found the Trump campaign’s request from the court “offensive”.

“What are you saying? Why are we here? You want to preserve the poll data? That is offensive to me. Why don’t we wait to see if the secretary of state wants to do this?”

The Trump campaign wants to make names of Nevada poll workers public. Judge's response: pic.twitter.com/tes99IMbbH — Deadspin (@Deadspin) November 8, 2016

Trump and Democrat Hillary Clinton are in a close contest for Nevada’s six electoral votes in Tuesday’s election after a long and contentious campaign.

REPORTER’S NOTEBOOK: US election tactics – Getting voters out, or to stay home

Nevada is one of several states that permits early voting, and Las Vegas is viewed as a base of support for Clinton.

Nevada state law says voters who are in line at 8pm, when the polls close, must be allowed to cast their ballots.

Trump’s lawsuit, filed in a Nevada state court on Monday, said election officials violated state law because they allowed people to join the line after 8pm at a polling location at a Latino market during last week’s early voting period.

Trump, a New York businessman and reality TV personality who has never previously run for political office, said last month he might not accept the outcome of the national election if he thinks it is unfair.

“We have to keep the system honest,” Trump said on Fox News on Tuesday before Eighth Judicial District Court Judge Sturman rejected his request.

The lawsuit had asked the court to order officials to preserve various records from the Cardenas Market and to segregate ballots from the voting machines at issue.

Clinton spokesman Glen Caplin said the campaign was pleased by the ruling and described Trump’s suit as “a desperate response to the record turnout we’re seeing in Nevada and across the country”.