A group of California counties has struck a $305 million deal to end nearly two decades of litigation seeking to hold three companies liable for cleaning up lead paint in the state’s older housing stock.

Lawyers for 10 local governments and the companies—The Sherwin-Williams Co., ConAgra Grocery Products Co. and NL Industries Inc.—filed court papers Wednesday indicating that each of the companies had agreed to pay a third of the settlement. The total is a little more than a quarter of the amount of the initial $1.15 billion judgment handed down in 2014 by now-retired Santa Clara Superior Court Judge James Kleinberg and less than the $409 million judgment entered Judge Thomas Kuhnle post-appeal.