Motel 6 will pay $12 million to settle a lawsuit claiming the chain improperly provided guest lists to immigration authorities for two years, Washington state's attorney general announced Thursday.

The lawsuit said Washington locations of the chain provided information to U.S. Immigration and Customs Enforcement without a warrant. As a part of the settlement, Motel 6 has committed to no longer hand over guest information at all U.S. locations, unless required by warrant, subpoena or law.

"Many Motel 6 locations in Washington turned over the personal information of their guests to ICE on a daily basis without requiring a warrant," a release from Attorney General Bob Ferguson's office reads. "From 2015 to 2017, seven Washington locations shared the personal information of approximately 80,000 guests."

The release says Motel 6 released customer information including names, driver’s license numbers, passport and green card ID numbers, room numbers, birthdates and license plate numbers.

ICE used the information to target guests with Latino-sounding names, Ferguson alleged.

An attorney general’s investigation found that Motel 6's practice led to the detainment of at least nine people in the state, the release says.

In November, Motel 6 settled a separate lawsuit in Arizona. The company agreed to pay up to $7.6 million to guests who said their private information had been shared with immigration officials.

"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," a statement from the company said.

Contributing: The Associated Press