SEATTLE — Google has agreed to pay $400,000 to settle charges that it has not complied with Washington’s strict campaign finance laws, which require businesses to retain records of political ads they sell in the state.

It’s the second time in three years that the tech giant has settled a campaign finance lawsuit in Washington. In 2018, Google paid $200,000, plus attorneys’ fees, to settle a similar lawsuit, but admitted no wrongdoing. This time, the company agreed it did not comply with state law, but still disputes whether the law applies the company.

Both lawsuits were brought in King County Superior Court by state Attorney General Bob Ferguson, who has brought similar cases against Facebook, including one that is still pending.

Google will also pay an additional $23,000 to cover the state’s attorneys’ fees.

The lawsuits cite longstanding state law that requires media companies to collect and make public detailed information about political ads. Ad sellers must keep and disclose specific information on the names and addresses of people who buy ads, geographic locations ads are targeted at and the total number of views of each ad. Those requirements have long applied to television stations, newspapers and billboard owners, but the state’s lawsuits said Facebook and Google have failed to comply.

Following the previous lawsuits, both companies voluntarily announced, in 2018, that they would stop selling political advertisements in Washington. But they did not.

Ferguson’s lawsuit against Google found that at least 57 candidates bought ads on Google-hosted networks and the tech company did not, as required, retain information about the ads and the candidates.

Michael Aciman, a Google spokesperson, said the company takes issue with “the applicability and enforceability of the State’s political advertising and disclosure laws.”

“We’re settling this case because we believe the best way to resolve this matter is to work collaboratively with Washington State regulators to reform those laws, rather than litigate our position in court,” Aciman said. “Until then, we will continue to not accept Washington State election ads. Any advertiser that purchases these ads is violating our policies and we have measures in place to block such ads and

remove violating ads when we find them.”

Google also previously said that Washington candidates and campaigns that bought ads were violating the company’s policies.

Two Washington residents, Eli Sanders, an independent journalist, and Tallman Trask, a law student and campaign staffer, requested data from Google, and filed complaints when the tech giant failed to comply.

“Google is one of the largest corporations in the world, and should be able to figure out how to follow our campaign finance laws,” Ferguson said in a prepared statement. He noted that the new settlement is twice as big as the one Google agreed to in 2018.

Facebook is contesting the lawsuit Ferguson brought, challenging the constitutionality of Washington’s campaign finance law, which was approved by voters in 1972. That case is scheduled for trial in December.