Motel 6 reached a $12 million settlement with Washington state on Thursday after prosecutors said the chain violated privacy rights by giving information to immigration officials that sometimes led to the detainment or deportation of former guests.

Attorney General Bob Ferguson said that the company improperly provided U.S. Immigrations and Customs Enforcement (ICE) agents with "Latino-sounding" names of tens of thousands of hotel guests for two years. Some of those guests later were detained or deported as a result of those targeted investigations.

"Motel 6's actions tore families apart and violated the privacy rights of tens of thousands of Washingtonians," Ferguson said in a statement. "Our resolution holds Motel 6 accountable for illegally handing over guests' private information without a warrant."

The company issued a statement saying that in addition to paying the settlement, it would enforce its guest privacy policy, which prohibits the sharing of guest information except in cases where a judicially enforceable warrant or subpoena is present or where local law requires the release of the information.

"The safety and security of our guests, which includes protecting guest information, is our top priority, and we are pleased to be able to reach resolution in this matter," the company said.

It also agreed to provide training to employees to protect guest privacy.

PHOENIX MOTEL 6 ACCUSED OF NOTIFYING ICE ABOUT UNDOCUMENTED PATRONS

In a separate lawsuit filed in Arizona, the company agreed in November to pay up to $7.6 million to Latino guests who said hotel employees shared private information with immigration officials.

In Washington state, Ferguson said Motel 6 gave ICE information on a daily basis about a total of 80,000 guests without a warrant between 2015 and 2017.

CLICK HERE TO GET THE FOX NEWS APP

Ferguson filed the lawsuit in King County Superior Court last year, claiming the company's disclosures violated the state's Consumer Protection Act and a law against discrimination.

As part of the settlement, the company also must create an online tool for guests to file reports when they believe the hotel chain has shared guest information improperly.

The Associated Press contributed to this report.