The Florida Supreme Court ruled Thursday that more than a dozen local governments — including several in the Tampa Bay area — illegally established red-light camera programs by installing the devices prior to the Legislature approving them in 2010.

Though some lawyers involved in red-light camera litigation believe the ruling should result in millions of dollars in refund checks, they cautioned that motorists shouldn't expect that to happen without a fight.

"There will absolutely have to be litigation filed," said Luke Lirot, a Clearwater lawyer whose firm represents ticketed drivers. "It wouldn't be a difficult court order to get based on this Supreme Court precedent, but absent a court order, I don't see any municipality voluntarily giving back a dime of that money."

In the Tampa Bay area, Hillsborough County, Temple Terrace, Brooksville and Port Richey used red-light cameras before the Legislature approved their usage statewide with a law that took effect July 1, 2010.

The court ruled 5-2 Thursday that local governments were not allowed to enact their own traffic enforcement ordinances at the time because it conflicted with the state's uniform traffic code. But the court didn't order a refund of fines collected and the dispute is expected to continue.

Officials with local governments affected by the ruling said they were reviewing it. The fines collected during that time are in the millions of dollars.

Temple Terrace installed three cameras in October 2008 and generated $1.4 million in fines between then and November 2009. City spokesman Michael Dunn said he would have no comment "until our legal counsel has had an opportunity to review the court's decision."

Port Richey City Manager Tom O'Neill also said he would need time to review it. The cameras in Port Richey generated nearly $1.2 million from May 2008 to December 2010.

None of the six Pinellas County municipalities that have cameras need to worry about giving back money. Clearwater, Kenneth City, Gulfport, Oldsmar, South Pasadena and St. Petersburg all went live after the state law took effect. The same goes for Tampa cameras.

Hillsborough County began collecting fines from cameras at six intersections in late December 2009. Officials could not say how much money the cameras generated before July 2010.

"We are in the process of reviewing the Supreme Court of Florida's opinion . . . to determine its applicability, if any, to the county's original 2009 red-light camera ordinance," said Andrea Roshaven, a county spokeswoman.

In 2012, red-light camera operator American Traffic Solutions of Tempe, Ariz., paid $1.2 million to settle all claims related to its involvement with 26 Florida clients that operated red-light camera systems before the July 2010 enactment of the law.

"We felt that, at the time, it was an opportunity to put the issue behind us and move on," ATS spokesman Charles Territo said Thursday. Most of ATS's customers settled, too, he said, but a handful decided to stay in the case. He said he did not know whether those clients included any in the Tampa Bay area.

The decision Thursday came after red-light cameras in Orlando and Aventura were challenged and two appeals courts had conflicting opinions.

Orlando City Attorney Mayanne Downs said her office plans to return fines only to drivers who disputed their red-light camera tickets, but not to those who willingly paid them. She estimated that Orlando would have to return about $100,000 of the $4.3 million the city collected during that time.

Attorney David Kerner said all of those ticketed should get refunds — not just those who appealed.

"The Supreme Court has said the money they collected was collected unlawfully," said Kerner, of the West Palm Beach firm that sued Orlando and others over the cameras.

Kerner said his firm will try to obtain class-action status. If successful, it could mean refunds for everyone who was ticketed before the state law's adoption, except for those cited by cities that have settled, he said.

Times staff writers Zack Peterson, Richard Danielson, Will Hobson, Tony Marrero and Logan Neill and correspondent Robert Napper contributed to this report, which includes information from the Associated Press and Orlando Sentinel.