LAS VEGAS, Nevada (CNN) -- The Democratic Party can go ahead with a plan to set up "at-large" precincts for this weekend's Nevada caucuses in nine casinos on the Las Vegas strip, a federal judge ruled Thursday.
The 60,000-member Nevada Culinary Workers Union endorsed Barack Obama last week.
The state teachers union went to court to challenge the plan, arguing that the casino caucus sites Saturday night will give the roughly 200,000 workers on the Las Vegas strip an unfair advantage over other voters who have to work that night.
But U.S. District Judge James Mahan rejected that argument after a Thursday morning hearing.
The lawsuit sparked a battle between the 28,000-member Nevada State Education Association and the state's biggest labor organization, the 60,000-member Nevada Culinary Workers Union, which supports the casino caucuses. The culinary workers endorsed Sen. Barack Obama of Illinois in Saturday's contest and accused the teachers union of trying to tilt the race in favor of his leading rival, senator and former first lady Hillary Clinton of New York.
Recent published polls show Clinton and Obama in a statistical dead heat going into the Nevada contest. Saturday's results could give the winner the upper hand going into the first contest in the South, the January 26 primary in South Carolina.
"When you're trying to change the rules a week before that were approved 10 months before, that's just not right, and I think people see through it as just crass politics," D. Taylor, secretary-treasurer of the Nevada Culinary Workers Union, said Wednesday.
The teachers' union has not endorsed Clinton, though some of its members and leaders are backing the former first lady.
"There are many conspiracy theories, I'll grant you that," said Terry Hickman, the union's executive director. "But our effort and our belief is that there's a fundamental right of fairness that's being ignored."
The lawsuit claimed the at-large caucus sites would unfairly have more weight in terms of delegate allotment than caucuses throughout the rest of the state.
It also took issue with caucuses being held midday at those sites -- which they say made it easier for casino workers to caucus than it will be for other Nevadans.
Regular hours for the Democratic caucuses begin at 11 a.m. PT and run with counts to begin at noon, while Republicans begin their caucuses at 9 a.m. and run until 1 p.m.
Obama's campaign noted the suit was brought after Nevada's culinary workers' union, which represents more than 200,000 casino and hotel workers, endorsed Obama on Friday.
"Some of the people who set up the rules apparently didn't think we'd be as competitive as we were and trying to change them last minute," Obama said while campaigning in San Francisco, California, on Thursday, "but I think the judge was clear that you can't change the rules six days before a caucus.
"Any alteration would have disenfranchised maids, dishwashers [and] bellhops who work on the strip ..." he said. "I think it was the right decision to make sure that as many people in the caucus participate as possible."
Critics of the lawsuit, including Obama himself, say it was a clear attempt to suppress his support.
"Are we going to let a bunch of lawyers try to prevent us from bringing about change in America? Are we going to let folks change the rules when they don't work for them?" Obama said in a rally in Nevada.
"Get on your television station and say, 'I don't care about the home mortgage crisis, all I care about is making sure that some voters have it easier than others, and that when they do vote, when it's already easier for them, their vote should count five times as much as others,' " Clinton said.
"If you want to take that position, get on the television and take it," he added. "Don't be accusatory with me, I had nothing to do with this lawsuit."
Today's ruling allows nine casinos along the Vegas strip to become "at-large" caucus sites. Conference rooms at places like the Bellagio, The Paris and Wynn Las Vegas will be open for any employee to join during lunch breaks.
"These at-large caucuses facilitate a group of people that are critical to our community. They are everyday working people, they should be allowed to participate," said Peter Early, a senior vice president of human resources at Wynn.
"How else are we going to get a real sense of what the public is thinking about such an important issue, which is who is going to be our next president, than to have it at a place where everyone can participate?" said executive chef Paul Bartolotta.
CNN's Alexander Mooney, Rebecca Sinderbrand, Candy Crowley and Ted Barrett contributed to this report.