SEATTLE (AP) — Google and Facebook are being ordered by a Washington state judge to pay $455,000 for a campaign finance violation case, Washington state Attorney General Bob Ferguson said Tuesday.

Google will pay $217,000 and Facebook will pay $238,000 in response to two lawsuits filed in June that accused the tech firms of not obeying the state law on political-ad transparency, Ferguson said.

State prosecutors claimed that the companies violated a law requiring the companies to maintain detailed records about who is paying for online political ads on their platforms.

Facebook spokeswoman Beth Gautier said the company was pleased to resolve the matter.

“We’re working hard to protect election integrity and prevent foreign interference. We believe all ads should be transparent on Facebook and aren’t waiting for legislation to authorize political advertisers and house these ads in a public archive,” Gautier said.

Google couldn’t immediately be reached for comment Tuesday but the company said in June shortly after the lawsuits were filed that it would stop participation in political ads.

Google said in a statement then: “We take transparency and disclosure of political ads very seriously which is why we have decided to pause state and local election ads in Washington, starting June 7, while we assess the amended campaign disclosure law and ensure that our systems are built to comply with the new requirements.”

The lawsuits came after the state’s Public Disclosure Commission issued regulations related to a new law and passed an emergency rule that clarified that digital ad companies like Google and Facebook are subject to state law requiring them to maintain publicly available information about political ads, just like television stations and other media.

“Whether you are a small-town newspaper or a large corporation, Washington’s political advertising disclosure laws apply to everyone,” Ferguson said in a statement.

Commercial advertisers are expected to provide information as requested by the public but the state said Facebook and Google denied 2017 municipal election political advertising records to The Stranger newspaper when it sought them.

Ferguson said the companies failed to maintain those kinds of records.