SAN FRANCISCO — Google Inc. has agreed to pay to a $7 million fine to Louisiana, 37 other states and the District of Columbia to settle a probe that it collected personal data from unsecured wireless networks while operating its Street View fleet.

The Connecticut Attorney General’s Office, which led an eight-state committee that investigated the data collection, made the announcement Tuesday. Word leaked Friday that Google had reached a settlement with the states.

As part of the agreement, Google must educate employees about the privacy of consumer data and sponsor a public service campaign to teach people how to secure their wireless networks. Google also agreed to destroy the data it collected.

Google said it collected information that identified wireless networks for use in future location services and that its executives were not aware the Street View vehicles were also collecting other data, Connecticut Attorney General George Jepsen said in a statement. The information included emails, passwords, Web history, text messages and other confidential details. Google has disabled or removed the equipment and software used to collect the data, Jepsen said.

“While the $7 million is significant, the importance of this agreement goes beyond financial terms. Consumers have a reasonable expectation of privacy. This agreement recognizes those rights and ensures that Google will not use similar tactics in the future to collect personal information without permission from unsuspecting consumers,” Jepsen said.