(CNN) Some of the country's largest hotel companies continued to house immigrant detainees even after they publicly condemned the federal government's use of their rooms for this purpose, an attorney who receives government detention data told CNN.

At least seven companies issued statements in July opposing the detention of immigrants in their hotels following protests from customers and activists.

"We do not believe hotels should be used in this way and will decline any requests to do so," Choice Hotels, for example, said in its statement at the time.

Nonetheless, the government continued to place detainees in Choice hotels and in locations belonging to at least two other national hotel groups that had policies opposing the practice, according to data from immigration attorney Carlos Holguín, who receives monthly Department of Homeland Security reports on the placements of detained kids.

Holguín receives this information as one of the attorneys tasked with monitoring the government's adherence to the Flores agreement, a high-profile court settlement which dictates how immigrant children should be treated while detained. Two additional sources, who were familiar with the cases but requested anonymity, confirmed the details about these hotel stays to CNN as well.

At least 17 migrant youths were temporarily held by the federal government in hotels in August and September, according to ICE data provided to Holguín. The specific locations of all of the hotels were not available, and he did not have knowledge of whether additional youth were held recently or how many adults may also have been placed at hotels.

Federal data previously released to advocacy organizations through a public records request showed that ICE has used hotels in the past as well. Those used between 2015 and 2018 included a couple locations that held hundreds of immigrants -- and one that held thousands.

Without confirming CNN's inquiries about the recent use of hotels, ICE said that it "has long utilized hotels to temporarily house illegal aliens while pending release or transfer to another facility," and that "the typical stay is an overnight or two."

The agency said hotels may be used in "emergent instances" to hold detained immigrants, including migrant children who are on their own and on the way to licensed facilities or for family units.

What should we investigate next? Email Blake Ellis and Melanie Hicken

"Hotels are used to temporarily house vulnerable populations," the agency said in a statement. "Using hotels for short term detention of family units allows ICE to keep families together."

It did not provide information about what kind of security measures are typically taken when detained immigrants are placed in hotels.

Choice Hotels said that without the specific locations of the recent stays, it could not confirm or deny what sources told CNN -- that five immigrant youths were held in its hotels in August and September.

Three were held at a Comfort Suites in August, the sources said, while one stayed at Sleep Inn & Suites in August, and another stayed there in September. Before these stays, in July, Choice had said publicly that it was not aware of any of its hotels, which are independently owned and operated, "being asked to serve as detention facilities." The company told CNN it communicated its position to franchisees earlier this year and that each property manages its own reservations and contracts.

"We are working to take additional proactive measures to ensure Choice branded hotels are not being used as detention centers by examining the language in our brand Rules and Regulations and considering changes to establish greater clarity moving forward," Choice said.

The Best Western Plus Dragon Gate Inn in Los Angeles' Chinatown also reportedly held immigrant youth -- with two children staying there in August, and two in September.

When CNN called and asked to speak with the manager of this location, an employee said "we don't discuss that," and hung up. ICE's public data shows that Dragon Gate Inn has been used to house immigrant detainees in the past as well, dating back more than a decade.

The Best Western chain stated in July that it was unaware of any of its locations being used as detention centers. "We believe that hotels should be used for their intended purpose which is to provide accommodation for the traveling public," it said at the time.

When asked by CNN about the recent stays, the company said in a statement that the Dragon Gate Inn no longer "offers or provides accommodations" to ICE. It wouldn't say when the change was made or whether corporate had been aware of these stays.

While Red Roof Inn was not among the chains that came out publicly against the hotel detentions in July, the company told CNN it also had a policy at the time that its locations should not be used in this way.

"Red Roof hotels are not set-up or intended to be used as detention facilities," the company said. "We reject the idea that hotels are to be used for this purpose."

Yet according to the sources, at least eight minors were held at a Red Roof Inn in August and September. Red Roof said it was not aware that any property was being used for this purpose and couldn't look into the stays CNN inquired about without a specific location. It added that it has told its franchisees that "if there is a request for their hotel to be used as a detention facility, we strongly advise them to deny the request."

Marianne Jennings, professor emeritus of legal and ethical studies in business at Arizona State University, said hotel companies made these pledges even though they didn't necessarily have the power to ensure that all of their independently-run locations would actually put an end to the practice.

"They then have the charge of hypocrisy added to the emotional immigration issues," she said.

CREDO Action, an advocacy group which lobbied hotels this summer to stop the government from using their businesses to house immigrants, told CNN that the companies still doing this should "denounce these franchisees and their unconscionable actions, and demand that they take steps to stop all franchisees from collaborating with ICE."

Allowing immigrants to be detained at their properties, it said, helps ICE to "supercharge deportations."

Refusing to collaborate, they added, might "help weaken ICE's ability to carry out mass raids, especially those targeting families since many detention centers don't allow children."

Ginger Jacobs, a California immigration attorney, said the issue is more nuanced than this, however.

While she opposes the detention of immigrants in general, she said that it is currently a reality and hotels can be a more humane option than detention facilities. It all depends on why the immigrants are being held there and how they are treated. At least in the San Diego area, she said she previously observed hotels used for humanitarian purposes in urgent situations -- for a pregnant woman or a mom and young child who were awaiting transfer to a nonprofit shelter, for example.

The public statements made by these hotels may have been well-intentioned, she said, but simply cutting off access without understanding the specific circumstances in which they are being used could have unintended consequences.

What should we investigate next? Email us: watchdog@cnn.com.