PHOENIX — The Arizona Supreme Court has ruled Orbitz and other online travel companies must pay sales taxes to cities for their work in arranging hotel stays for customers, but it is unclear whether the communities will be able to collect millions of dollars in back taxes.

The ruling on Monday grew out of a 2013 effort by the cities to assess taxes against the sites for an eight-year period ending in April 2009.

The state’s highest court ruled the online travel companies are subject to the sales taxes because, under one tax law, they serve as brokers for the hotels.

The 11 cities that demanded that the sites pay taxes were Phoenix, Apache Junction, Chandler, Flagstaff, Glendale, Mesa, Nogales, Prescott, Scottsdale, Tempe and Tucson.

The companies involved are Orbitz, Trip Network, Expedia, Priceline.com, Travelweb, Travelocity, Hotels.com, Hotwire and Internetwork Publishing.

The Supreme Court ruled that the law prohibits taxation based on a new policy or interpretation until a city has provided taxpayers with clear notice of the chance.

The case is being sent back to a lower court to determine if the law prohibits cities from seeking the taxes before the tax assessments were made in 2013.

The cities argued they have applied the broker interpretation since 2002 and relied on a 2002 ruling involving a taxpayer in which a Scottsdale official regarded the online travel companies as brokers whose income is taxable.

They also cited a 2007 letter from the city of Peoria to an industry representative relaying the same information as the 2002 ruling.

The Supreme Court said one city’s ruling for one taxpayer doesn’t provide clear notice to all online travel companies on behalf of all the cities.

The court said it’s possible that the cities provided official notice of their intent to assess taxes against the companies on their status as brokers, but “such evidence is not in the record currently before us.”

John Crongeyer, one of the attorneys representing the cities, declined to say the amount of tax money the communities believe they are owed, but he said it’s fair to say it’s millions of dollars.

Crongeyer said the hotels have paid their sales taxes but the online travel companies have never paid their share.

Crongeyer said the decision represents a victory for the cities because it establishes that the online travel companies must pay the sales taxes. “This is what has been contested by the companies for years,” Crongeyer said.

Thomas M. Peterson, an attorney representing the travel companies, didn’t immediately return a phone call Monday afternoon seeking comment on the Supreme Court’s decision.