A US judge has ruled that Las Vegas casinos may be used by Nevada Democrats for presidential voting on Saturday.
Nevada Democrats agreed last year to hold some caucuses in casinos
Observers say the decision may benefit Barack Obama, who has won the backing of the union representing many of the shift workers employed in the casinos.
The lawsuit, filed by a teachers' group with ties to Hillary Clinton, argued it was unfair that only workers around the casinos could vote at their workplace.
Mr Obama, Mrs Clinton and John Edwards are competing to be the state's pick.
Saturday's caucuses - at which voters for each party in Nevada choose their preferred candidate to stand for president - will be the third contest for the Democratic candidates.
Mr Obama won the nomination in Iowa on 3 January, and Mrs Clinton came out on top in New Hampshire five days later. A vote in Michigan on Tuesday was largely symbolic.
Nevada's Republican Party is also holding caucuses on Saturday but, Mitt Romney aside, the Republican candidates have chiefly been focused on South Carolina, which holds its vote on the same day.
Senator John McCain, former Arkansas Governor Mike Huckabee and former Tennessee Senator Fred Thompson are all pinning their hopes on a win in South Carolina.
The heavily-unionised service sector workers in Las Vegas form a major voting bloc in Nevada and are a key part of the Democrats' constituency in the state.
KEY DATES FOR CANDIDATES
19 Jan: Nevada caucuses; South Carolina primary (Rep)
26 Jan: South Carolina primary (Dem)
29 Jan: Florida primary
5 Feb: some 20 states including California, New York, New Jersey
Mr Obama won the endorsement of the Culinary Workers Union, the biggest service sector union, earlier this month.
Shortly afterwards, the legal challenge was filed by the state teachers' union and other groups. The Clinton campaign has said it was not involved with the lawsuit.
The decision to create nine new precincts within casinos on the Strip - the main stretch of high-profile casinos and hotels in Las Vegas - was approved by the state's Democratic Party last summer.
They will be open to any shift worker working within 2.5 miles of the Strip when the caucuses are held.
Giving his ruling, Judge James Mahan said: "The Democrats can set up their own rules just as the Republicans can.
The three Democratic frontrunners took part in a debate in Las Vegas
"It is not up to some federal judge to come along and say, 'I don't like that'."
Mr Obama welcomed the decision, saying: "I think the judge was clear that you can't change the rules six days before the caucus, and any alterations would have disenfranchised the maids, dishwashers, bellhops who work on the Strip."
All three leading Democratic candidates have been campaigning in Nevada ahead of the caucuses.
The candidates took part in a debate in Las Vegas on Tuesday, where Mrs Clinton and Mr Obama promised to end their damaging dispute over racial politics.
The Democrats will take their contest to South Carolina a week after the Nevada caucuses, on 26 January.
Both Mr Obama and Mrs Clinton are trying to win over the state's large African-American community, and John Edwards is hoping to repeat his winning performance in the 2004 presidential primary.