A class of local governments and their lawyers lost a bid Thursday at the U.S. Supreme Court to challenge more than $2 million in litigation costs in a dispute over online taxation involving travel companies.

“District courts have discretion in awarding costs incurred prior to appeal, but when they tax appellate costs, they perform a different function,” Justice Samuel Alito Jr. wrote for a unanimous court in the case San Antonio, Texas v. Hotels.com.