SACRAMENTO — Facing a torrent of accusations, a for-profit company that operates taxpayer-funded online charter schools throughout California has reached a $168.5 million settlement with the state over claims it manipulated attendance records and overstated its students’ success.

The deal, announced Friday by Attorney General Kamala Harris, comes almost three months after the Bay Area News Group published an investigation of K12 Inc., a publicly traded Virginia company, which raked in more than $310 million in state funding over the past 12 years operating a profitable but low-performing network of “virtual” schools for about 15,000 students.

“Knowing that something will be done to address the schools’ problems is very reassuring,” said Gabriela Novak, who pulled her daughter Elizabeth from K12’s San Mateo County school after a year of frustrations and difficulty communicating with her teachers. “Finally, the system is working.”

Harris’ office found that K12 and the 14 California Virtual Academies used deceptive advertising to mislead families about students’ academic progress, parents’ satisfaction with the program and their graduates’ eligibility for University of California and California State University admission — issues that were exposed in this news organization’s April report.

The settlement could help spur legislation that would prevent for-profit companies like K12 from operating public schools in California.

The Attorney General’s office also found that K12 and its affiliated schools collected more state funding from the California Department of Education than they were entitled to by submitting inflated student attendance data and that the company leaned on the nonprofit schools to sign unfavorable contracts that put them in a deep financial hole.

“K12 and its schools misled parents and the State of California by claiming taxpayer dollars for questionable student attendance, misstating student success and parent satisfaction and loading nonprofit charities with debt,” Harris said in a statement. “This settlement ensures K12 and its schools are held accountable and make much-needed improvements.”

The California Teachers Association and the California Charter Schools Association both applauded Harris’ announcement and denounced the company’s practices — even though the two special-interest groups are frequently foes.

But in a news release Friday, K12 stressed that it had admitted no wrongdoing and insisted it had already planned to take up several of the 60 corrective actions required under the agreement over the next few years. It also disputed the attorney general’s description of the size of the settlement, calling it “flat wrong.”

“Despite our full cooperation throughout the process, the Office of the Attorney General grossly mischaracterized the value of the settlement just as it did with regard to the issues it investigated,” K12 Chief Executive Officer Stuart Udell said in the statement.

Under the settlement, which is subject to court approval, K12 will pay $8.5 million to settle the state’s claims.

It also agreed to “expunge” about $160 million in credits it has issued to the California Virtual Academies since 2005 that have helped the schools cover the cost of the contracts they hold with the company, whose rates routinely exceed what the schools can afford.

But Udell said that the credits should be called “subsidies,” not debts, and that the company’s commitment to expunge them shouldn’t be used by Harris to hike the size of the settlement. He also defended the credits, saying they had protected the schools against financial uncertainties.

“(The) schools have not paid that money to K12 and K12 never expected to receive it given California’s funding environment,” Udell said.

This news organization’s investigation into K12’s California schools revealed the company reaps tens of millions of dollars annually in state funding while graduating fewer than half of its high school students. It also showed that kids who spend as little as one minute during a school day logged onto K12’s software may have been counted as “present” in records used to calculate the amount of funding the schools get from the state.

The revelations show why California needs tighter rules for online charter schools, said Bruce Fuller, an education policy professor at UC Berkeley.

“Virtual charter schools’ profit-seeking too often leads to deception about their true effectiveness,” Fuller said. “The Legislature should move aggressively to prevent such harm to students and taxpayers.”

The settlement requires K12 to take a slew of corrective actions.

The company must: ensure the accuracy of its advertisements, train teachers to prevent improper attendance claims and reform the way K12 contracts with the California Virtual Academies.

K12 must also eliminate any type of incentive compensation for its enrollment staff, provide all students functional computers and give families a subsidy of at least $20 per month to cover the cost of high-speed internet service.

Emily Bertelli, a spokeswoman for the California Charter Schools Association, called the settlement “a good start,” but said the Legislature must change the law to prevent such abusive practices from happening again.

When lawmakers return to work in August after a monthlong summer recess, they’ll consider Assembly Bill 1084, authored by Assemblywoman Susan Bonilla, D-Concord, which would ban online charter schools from hiring for-profit companies for instructional services.

Bertelli’s group has offered amendments that it believes will strengthen that proposed legislation.

“We are hopeful that the Legislature doesn’t miss an opportunity at this critical juncture to do right by students,” Bertelli said in a statement.

Contact Jessica Calefati at 916-441-2101. Follow her at Twitter.com/Calefati.