“The centers are not ideal, but they are safe, supervised, and provide three square meals, instruction and other resources,” she wrote. “Those are indeed better conditions than many poor American children have.”

“As an American mom,” she added, “I have compassion for these kids too.”

Ms. Campos-Duffy did not directly address criticism that associating black people with public housing was a stereotype. She said that she based her comment on a recent conversation with one man who is African-American, not multiple African-Americans, as she originally stated.

“I mentioned it because I HAD just spoke to an African American who complained to me about never seeing this level of media attention about Black kids being separated from their parents and that some of the facilities he saw looked nicer and safer than the projects he grew up in,” she wrote.

Online, critics pointed out that all kinds of people live in public housing, and that children there are not kept in cages. The New York City Housing Authority, the country’s largest public housing authority, served about 171,000 families in public housing as of Jan. 1, 2015; 45 percent were black, according to data the agency provided on its website.