OYSTER CREEK, Tex. — A shelter for Central American children who crossed the border illegally opened behind Gregg Griffith’s house here a few months ago. The children are quiet. No one has hopped over the fence that separates his backyard from the shelter, a once-vacant youth home. But when Mr. Griffith looks at the brightly painted brick buildings, he is mostly resentful.

“That’s my tax money taking care of a foreign national or however you want to classify them,” said Mr. Griffith, 51, a volunteer fireman and researcher at a chemical plant. “I don’t want to take care of a foreign national. It’s not my problem. We did house kids in Brazoria County there at the youth home. I sort of feel like we should be taking care of our own first.”

Overwhelmed by an influx of unaccompanied minors who are fleeing violence in their home countries in Central America, federal officials are searching the country for places to house them and have been forced to scrap some proposed shelter sites in California, Connecticut, Iowa, New York and other states because of widespread opposition from residents and local officials.

The politics of handling the wave of immigrants has grown toxic and holds perils for President Obama.