The president, who sent national guard troops to the city, said local officials failed to protect immigration agents.