SACRAMENTO — Human resources startup Zenefits will pay up to $7 million in penalties under terms of a settlement with California regulators who had accused the San Francisco company of selling insurance policies without the proper licenses.

The fine—the largest levied against Zenefits in the nation, according to Insurance Commissioner Dave Jones—consists of $3 million for licensing violations and $4 million for employees “subverting” education requirements plus $160,000 to cover the state’s investigation and exam costs. Half of the penalty will be waived if the company can show continued compliance with applicable laws in a 2018 review.