9thCirAccording to one California observer, the “list of businesses abandoning California for more hospitable business environments reads like a roll call of top companies.” That corporations have been fleeing California’s escalating costs and over-the-top regulation is not all that surprising. But few may be aware of one of the Golden State’s more creative efforts to reverse that trend: enacting laws that force companies to incorporate in California if they want to do business there.

The U.S. Court of Appeals for the Ninth Circuit recently took up—and overturned—one such law in Nationwide Biweekly Admin. v. Owen. The case arose from Nationwide’s biweekly mortgage loan repayment program, which facilitates homeowners with mortgages who wish to make 13 monthly mortgage payments a year, ostensibly reducing a 30-year mortgage into a 23.9-year mortgage.

In 2014, following an investigation by the Monterey County District Attorney’s office, California’s Commissioner of the Department of Business Oversight sent a letter to Nationwide advising that the company was being investigated by the Department’s Enforcement Division for possible “unlicensed business activity” as a prorater.

Under California Finance Code § 12200, a “prorater” is defined as anyone “who, for compensation, engages in whole or in part in the business of receiving money . . . for the purpose of distributing the money . . . among creditors in payment or partial payment of the obligations of the debtor.” Section 12200 prohibits “acting as a prorater . . . without first obtaining a license from the commissioner.” Cal. Fin. Code § 12200.  Yet a license to engage in this activity is available only to corporations “organized under the laws of this State for that purpose.” See § 12200.1. In other words, to obtain a license to do business in California, Nationwide was required to become a California corporation.

Rather than await any enforcement action, Nationwide preemptively filed suit in the U.S. District Court for the Northern District of California. Nationwide sought injunctive and declaratory relief to prevent the Commissioner from enforcing § 12200 against it. In support of that request for relief, Nationwide argued that the law facially discriminates against interstate commerce in violation of the “Dormant Commerce Clause” of the U.S. Constitution, which prohibits states from passing laws that target out-of-state businesses.

The district court denied Nationwide’s request for preliminary injunction, concluding that Nationwide was unlikely to succeed on the merits of its claim.

On appeal, the Ninth Circuit reversed. The panel held that Nationwide was likely to succeed on its claim that the Dormant Commerce Clause precludes California from making in-state incorporation a requirement for licensure. Writing for the panel majority, Judge Reinhardt explained that discriminating between in-state and out-of-state economic interests is incompatible with a functioning national economy. Indeed, the very prospect of each corporation being required to create a subsidiary in each state is precisely the sort of “balkanization” that the Dormant Commerce Clause exists to prevent. The panel vacated the district court’s order and remanded for further proceedings.

It isn’t hard to imagine the mischief that would soon result if every state passed a law similar to California’s. Instead of treading on the rights of businesses trying to sell their products in a national market, as California sought to do, Judge Reinhardt’s common-sense decision safeguards the Constitution’s interest in preserving a national economy.

Also published by Forbes.com on WLF’s contributor page.