Online travel booking firms including Orbitz Worldwide Inc. and Expedia Inc. are asking Congress to resolve in their favor a legal dispute with cities and counties over hotel occupancy taxes.

The online firms are seeking to add a provision to economic stimulus legislation pending in the U.S. Senate, that limits their exposure to the taxes.

The firms have battled lawsuits from cities including Houston and Louisville, Ky., claiming that the companies underpaid hotel bed taxes. The online firms have been quietly lobbying for Congress to step in since last year, but the controversy broke into the open when the provision turned up this week on a Senate Finance Committee staff draft list of possible items being considered for a stimulus bill.

Local government groups representing cities, counties and officials who control local government purse strings immediately launched a counter-attack. The groups wrote senators Wednesday that the online firms’ lobbying was “nothing more than efforts to preempt state and local taxing authority.”

Hotels, too, have joined the fray, with companies including Starwood Hotels and Resorts Worldwide Inc. (HOT), lobbying alongside local governments to block the online firms’ efforts. Starwood owns such brands as Westin, Sheraton and St. Regis.

The provision favored by online travel firms is unlikely to be included in an initial jobs and stimulus bill Senate Democrats are unveiling next week, according to a Senate leadership aide. But Democrats plan to move more than one bill this year aimed at spurring the economy.

The dispute revolves around how much the online booking firms should pay in hotel occupancy taxes, which municipalities use to promote tourism. The online firms claim they owe taxes only on the discounted amount they pay hotels for the rooms, not on the full amount paid by the customer.

For instance, if an Orbitz customer pays $100 for a room booked on the firm’s Web site, and Orbitz negotiates an $80 room rate with the hotel owner, the online firm pays tax on the $80 discounted rate. If the tax rate was 5%, Orbitz would pay $4, rather than $5 if the tax was assessed on the full price paid by the customer.

Hotels say that gives the online booker a pricing advantage, which makes the customer less likely to book on the hotel operator’s own Web site. The same room, if booked on the hotel site, would be subject to a $5 tax in the example cited above.

The online firms have received backing for their effort from Sens. John Ensign (D., Nev.) and Ron Wyden (D., Ore.), according to lobbyists and congressional aides. Those senators’ offices did not respond immediately to requests for comment.

Senate Majority Leader Harry Reid (D., Nev.) is also sympathetic to the position of the Internet travel firms.