While the U.S. Supreme Court may have delivered a split decision on Arizona’s controversial immigration law with its 5-3 ruling last week, the two-year federal court battle has clearly benefited the bottom lines of three law firms.

Snell & Wilmer, Ballard Spahr and Bancroft have collectively reaped nearly $3 million in legal fees for their work defending the state against three separate lawsuits as one legal challenge to the law made its way to the nation’s highest court, according to The Arizona Republic.