By Joseph Ax

NEW YORK (Reuters) - A group of local governments in New York State has won class-action status in a lawsuit that accuses online travel booking companies of failing to pay millions of dollars in hotel taxes, one of dozens of cases in a legal battle playing out all across the country.

Nassau County filed the lawsuit in 2011 on behalf of at least 56 government entities, claiming that companies such as Expedia, Orbitz and Priceline have not paid their fair share in local occupancy taxes.

Similar lawsuits throughout the United States have pitted various local governments against online travel companies, which profit by buying rooms from hotels in bulk before selling the rooms to consumers at a higher price.

Municipalities claim the companies only pay taxes on the wholesale rate they paid, rather than the retail rate consumers are charged, and pocket the difference.

The booking companies have argued that the difference in rates is essentially a service fee, not part of the room's price, and is therefore not subject to occupancy taxes.

On Wednesday, state Supreme Court Justice Stephen Bucaria in Nassau County ruled that the county, which levies a 3 percent tax, could serve as the lead plaintiff for 56 cities and counties that impose a hotel tax. The class would likely include New York City and the tax revenues from its massive tourist industry.

Robin Reck, a spokeswoman for the Travel Technology Association, an industry group representing the online booking companies, declined to comment.

"This is a huge step," said Nassau County Attorney John Ciampoli. "What we're basically saying here is, it doesn't matter how you go about booking your hotel room, you have to pay the tax."

It is unclear how much money is at stake, Ciampoli said, though he guessed it would "easily" exceed $50 million.

Overall, state and local governments have found it difficult to prevail in such cases. According to the Tax Foundation, a Washington, D.C.-based think tank, the majority of courts have found in favor of the online booking companies.

In recent months, the issue has continued to divide courts.

A federal judge in San Antonio earlier this month ruled that the booking companies owed 173 Texas municipalities more than $55 million in back taxes, while a Florida judge sided with the companies in February.

New York City attempted to close what it saw as a tax loophole by extending a 6 percent occupancy tax to "online travel intermediaries," but a state appeals court struck it down in 2011, ruling that the city had exceeded its statutory authority.

The case is County of Nassau v. Expedia Inc et al, New York State Supreme Court, Nassau County, No. 013818/2011.

(Reporting by Joseph Ax; Editing by Tim Dobbyn)