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.

“Zenefits is an example of an internet-based startup whose former leaders created a culture where important consumer protection laws were broken—a bad strategy that placed the company at risk and that other startups should not follow,” Jones said in a prepared statement.

In 2013, Zenefits emerged as a rival to payroll giant ADP LLC, offering free personnel management software to businesses that are often too small to have their own human resources director or department. The company takes a cut of the purchase prices customers pay for products and services via the software.

The fast-growing company, once valued at $4.5 billion, attracted scrutiny from regulators across the country questioning whether Zenefits employees were properly licensed to sell the group and life insurance policies offered to customers. A company investigation, prompted by inquiries by the California Department of Insurance, found that of 8,118 policies Zenefits sold between January 2014 and November 2015, at least 1,994 were handled by employees lacking the required licenses.

The company also discovered that former Zenefits CEO Parker Conrad had created a software “macro” that allowed at least 99 employees to complete pre-licensing insurance coursework online in less time than required by law, according to the settlement. Shortly after Buzzfeed reported news of the fudged training records in February 2016, Conrad resigned and the state Department of Insurance publicly confirmed its investigation.

Zenefits has settled similar improper-licensing claims with regulators in at least seven other states this year: Arizona, Delaware, Minnesota, New Jersey, South Carolina, Tennessee and Washington. The Utah insurance commissioner in 2014 ordered the company to stop offering its free software in his state. That state’s lawmakers and governor responded by enacting legislation that now allows Zenefits to operate legally.

The company has also overhauled its executive team, naming Joshua Stein its chief compliance officer in February. Stein was promoted to general counsel earlier this month.

In agreeing to conditionally suspend half the penalty, insurance department officials noted that Zenefits reported some of its missteps to the state, retrained existing licensees and created a new automated system that allows only license-holders to solicit and sell insurance.

“We are pleased to reach a settlement with the California Department of Insurance, which recognized our remediation efforts by suspending half the fine,” Zenefits spokeswoman Jessica Hoffman said in an email. “New management has righted the ship at Zenefits.”

Contact the reporter at cmiller@alm.com.