JPMorgan Chase & Co. lost a bid to throw out a lawsuit by the California attorney general alleging that the largest U.S. bank by assets illegally tried to collect debt from about 100,000 credit-card borrowers.

California Superior Court Judge Jane L. Johnson in Los Angeles on Tuesday rejected the bank’s argument that the attorney general’s unfair competition claims were precluded by California legal authority.