In a lawsuit filed on Election Day in Las Vegas, Republican presidential candidate Donald Trump sued the Clark Country Registrar of Voters in an attempt to challenge a decision by the Registrar to keep polls open as people waited to vote on Friday night.

The complaint is titled Donald Trump v. Joe Gloria, first reported by CNN’s Joe Sciutto, and can be viewed here. Update: in a live-streamed hearing, a state judge refused a request by a lawyer for Trump to seize the disputed ballots.

The lawsuit came after a surge in early voting in Las Vegas on Friday resulted in a line of people waiting to vote after 8 p.m. local time, which is when the polls officially closed. In response, the county kept the polls open for additional hours until those still in line could cast their ballot.

Soon after, Trump seized on the county’s decision as evidence of a “rigged system.”

The accusation, however, appears to be without merit. A Nevada state law, like those in many other states, clearly instructs election officials to ensure that those who arrive at a poll in time are given an opportunity to vote. Here’s a screenshot of the law:

screen-shot-2016-11-08-at-1-49-16-pm

Meanwhile, an election law blog post about the controversy explains that Nevada also relies on a related regulation to ensure the process is not manipulated. The safeguard reportedly relies on stickers or other methods of identifying who is in line:

This administrative rule is Nevada Administrative Code § 293.247, and it provides:

After determining who is the last person waiting to vote at the time that the polls close, a member of the election board shall:

(a) Place a sticker or other distinguishing mark on the last person waiting in line to vote; or

(b) If the last person waiting to vote does not want a sticker or other distinguishing mark placed on him or her, physically stand behind the last person waiting in line to vote, to ensure that no other person enters the polling place to vote.

Political observers have suggested the Friday lines in Las Vegas are the result of a surge in voting by Hispanic Americans, which would benefit Democratic nominee Hillary Clinton.

The lawsuit, therefore, may be amount to an early challenge by the Trump campaign to overall results in Nevada, which is an important battleground state in the presidential race.

Trump sought a “writ of mandamus” or a “writ of prohibition” – basically an order from the court for a state official to do something or refrain from doing something. Reports from the hearing on Twitter show the judge was annoyed and incredulous at the request, and suggested it was a threat to the secrecy of the ballot and could lead to intimidation at the polls:

In rejecting the request, the judge ruled, at around 2:55pm ET, that the Trump campaign had not exhausted its administrative remedies – and that the candidate should instead lodge his complaints with the Secretary of State.