“The one thing you have to do, and as Jesus was saying and the mayor was saying, there was a huge problem with the illegals coming through,” he said. “You have to make the people that come in, they have to be legal.”

When asked how, he stammered. “You have to let people do their job, the border patrols,” Mr. Trump said, later adding, “In certain sections you have to have a wall.” Exactly what sections, or how that job was not being done, was not immediately clear.

The caustic language that has been Mr. Trump’s hallmark was largely absent on Thursday. He reserved his most disparaging comments for Rick Perry, the former governor and a rival for the Republican presidential nomination, saying he “did a terrible job as governor of Texas” and that he “doesn’t understand” border security. The much anticipated trip hit its first bump Thursday morning when the local border patrol union that had invited Mr. Trump rescinded its offer, saying “an endorsement was never discussed for any presidential candidate.” Officials in Laredo then stepped in to help show Mr. Trump around.

He received a police escort as dozens of officers guided his S.U.V.s and chartered buses packed with members of the news media through downtown. Traffic was blocked and traffic lights were skipped, but the occasional protester was still able to get in view of the caravan.