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.
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 said in a statement that the company complied with Washington laws until June, when the state introduced new disclosure requirements. Google said it then paused accepting election advertising in the state because it was unable to follow the new rules.
"We've rolled out several features this year to ensure transparency in U.S. federal elections and we are looking at ways to bring these tools to the state level as well," the company said.
As part of the settlements Google and Facebook denied liability and said they continue to deny they broke the law.
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.