For the first time, a court has ruled that Allstate Insurance Co.’s controversial claims processing policy, which discourages claimants from hiring lawyers, amounts to the unauthorized practice of law.

The ruling exposes the nation’s second-largest automobile insurer to millions of dollars more than it otherwise would have been on the hook for.