Donald Trump's campaign filed a lawsuit Tuesday against the Clark County Registrar in Nevada for letting people vote for a few hours after a designated early voting period expired, which Trump's lawyers said was aimed at helping Democrats vote.

A key element of that lawsuit was quickly rejected by a county judge just hours after it was filed. However, the action indicates the Trump campaign is already setting up a way to challenge the results in Nevada.

Trump's campaign challenged a decision made by the Clark County Registrar to let people vote early on Friday night as long as they were in line to vote by the time the polls closed at 8 p.m. Officials said it took a few additional hours past 8 p.m. to let everyone still in line vote.

Nevada law states that voters in line past the time when polls close are allowed to vote. However, Trump's lawyers wrote that the actions on Friday showed collaboration with Democratic activists.

"The registrar's violations were not random and neutral in their effect, but very much appear to have been intentionally coordinated with Democratic activists in order to skew the vote unlawfully in favor of Democratic candidates," the lawsuit stated.

Local Republicans immediately made the same complaint on Saturday. Michael McDonald, chairman of the Nevada GOP, said the polls were kept open so " a certain group" could vote. About 30 percent of voters in Clark County are Latino, according to CNN.

The lawsuit said a Trump poll watcher was told by an election official that a poll at a supermarket was ordered to be kept open until 10 p.m., when the market closed. The election official, only named as "Joe" in the suit, told the Trump poll watcher that it was being done to help former Secretary of State and Democratic nominee Hillary Clinton.

"Joe told Mr. Ketcham (the poll watcher) directly that other polling locations were being closed on time and voters still in line were instructed to come to the polling location at Cardenas Market at 10," the lawsuit stated. "Joe commented to Mr. Ketcham that he felt this selective closing was done to help Hillary Clinton."

The poll watcher said that between 150 and 300 people entered the line after 8 p.m. and the suit states "the actual number could have been significantly higher."

Trump's lawsuit asked for the early voting ballots to be kept separate from votes cast on Election Day and in other locations. The lawsuit also asked the court to order that all records of who was volunteering at the various polling spots must be preserved.

But Tuesday afternoon, Clark County Judge Gloria Sturman denied the request to order the preservation of documents, because the state's Secretary of State was already doing so. Aside from simply being repetitive, Sturman said she worried that issuing a court order would make these records part of the public record, which could make it easier for the volunteers to be harassed by "Internet trolls."

"Why do you need a court order to say, 'This is discoverable information?'" she said. "The problem is once its discoverable ... anybody can get access to this, and I'm not doing that."

When Trump's lawyer promised that those election workers would not be harassed, Sturman was dismissive in her response.

"Do you watch Twitter? Have you watched any cable news show?" she said. "Why would I order them to get information about people who work at polls so those people can be harassed for doing their civic duty?"

A statement from the county backed up the judge's argument that the records are already being preserved in accordance with state law.

"The petition from the Trump campaign is a request to have us preserve the records from early voting," read a statement provided to Las Vegas journalist Jon Ralston. "This is required by state law, and so it is something we are already doing."

As a result, the Trump campaign was ordered to return to the Nevada secretary of state's administrative process for challenging electoral results before coming back to the courts. She said the campaign skipped a step in filing its lawsuit, as it had not exhausted all of its possible remedies.

At a Saturday rally in Las Vegas, which is in Clark County, Trump hinted that legal action might be taken by railing against the decision to let people vote after the polls closed on Friday night.

"It's being reported that certain key Democratic polling locations in Clark County were kept open for hours and hours beyond closing time to bus and bring Democratic voters in," he said. "Folks, it's a rigged system."

The hearing didn't address Trump's charge that busloads of voters were brought to voting locations after the polls closed. However, a county attorney and Sturman said during the court hearing that election volunteers during early voting periods tend be more casual about cutting off voters after the polls close than they are during Election Day.

Carlos Munoz, Trump's Nevada state director, said the allegations of keeping the voting site open should be concerning to all Americans.

"The incidents that occurred on Friday night should be troubling to anyone who is interested in free and fair elections. Voters who showed up after the scheduled closing times at selected locations were allowed to vote, while those who were not able to make it to other early voting sites by the posted closing times were denied the right to cast their ballots."

"Even more concerning is that Clark County employees seem to be facilitating illegal activity, at the direction of Joe Gloria, whose primary function is to ensure the integrity of elections in Clark County," he said.