A state appeals court has reinstated a lawsuit seeking refunds of $30 million in cell phone taxes paid by California customers of the AT&T subsidiary New Cingular Wireless, including $4 million in San Francisco.

New Cingular and other AT&T companies collected taxes on charges for cell phone Internet service from October 2005 to November 2010 and passed them along to cities and counties, unaware that federal law exempted Internet access from state and local taxes, the Second District Court of Appeal said in its ruling. In a settlement of a nationwide suit by phone customers, the companies, including New Cingular, agreed to seek repayment of the taxes and refund the money to them.

Forty-two California cities have refunded part or all of the money, but 96 have refused, said James Frickleton, a lawyer for cell phone customers. He said those 96 cities collected $65.2 million during the five-year period and have statutes of limitations, or deadlines for filing suit, that have exempted them from repaying taxes collected during the early years, leaving them entitled to keep all but $30 million.

San Francisco, for example, received nearly $9 million in Internet-access taxes but is on the hook for only the $4 million that it collected in 2009-10, Frickleton said.

A judge in Los Angeles dismissed New Cingular's suit against the cities, saying the company lacked legal authority to seek refunds for its customers because it hadn't suffered any financial losses. The appeals court disagreed.

Unless the suit is reinstated, the cities "will likely keep the improper taxes, leaving them unjustly enriched at the expense of New Cingular's customers," Justice Roger Boren said in Tuesday's 3-0 ruling. Although the company isn't claiming refunds on its own behalf, Boren said, it is contractually required to seek the repayments under the terms of the nationwide settlement.

Frickleton said New Cingular has records of customers who paid the excess taxes and will send them refunds once the case is resolved.

But San Francisco Deputy City Attorney Peter Keith said most of the claimed refunds would be eaten up by attorneys' fees and other costs and very little would go to customers. He said cities would be willing to reimburse their taxpayers but object to paying the money to a company that "made the mistake in the first place and didn't suffer any out-of-pocket loss."

Frickleton said a federal judge has limited attorneys' fees to 20 percent of any refund paid.