Every day for over two and a half years, and sometimes twice a day, immigration agents arrived at several Motel 6 locations in Washington State and, without warrants, were able to obtain the names, birth dates, identification data, room assignments and license plate numbers of every guest.

The agents, with the Immigration and Customs Enforcement agency, or ICE, would sometimes circle the names of guests that sounded Latino before targeting them for questioning, detainment and deportation, according to a settlement agreement announced this week by the state’s attorney general, Bob Ferguson.

Over the period in question, employees at seven motels gave information related to 80,000 guests to the agents, violating the company’s privacy policy, Mr. Ferguson’s office said on Thursday. To resolve a lawsuit the office filed against Motel 6 last year, the chain agreed to pay $12 million, much of it in damages to guests who were affected.

Motel 6, which is owned by the private equity firm Blackstone Group and has 1,400 locations in North America, also signed a legally binding commitment to stop volunteering guest information absent a warrant anywhere in the United States.