President Donald Trump says he told the U.S. military mobilizing at the Southwest border that if migrants try to throw rocks at them, the troops should act as though the rocks are a “rifle.”

Trump made the comments Thursday in a speech on immigration at the White House. During his comments, he was asked if U.S. troops might fire on migrants:

“It’s the military. I hope there won’t be that,” Trump said. “Anybody throwing stones, rocks, like they did ... to the Mexican police, where they badly hurt police and soldiers of Mexico ... we will consider that a firearm, because there’s not much difference where you get hit in the face with a rock.”

[Editors note: On Friday, President Trump appeared to walk back his remarks about rules of engagement.]

As caravans of migrants from Central America are slowly winding north, one group got into a violent confrontation with Mexican police at the border with Guatemala, throwing rocks. Trump appeared to refer to that conflict.

“They are throwing rocks viciously and violently. You saw that three days ago, really hurting the military," he said. “We are not going to put up with that. If they want to throw rocks at our military, our military fights back. I told them to consider it a rifle. When they throw rocks like they did at the Mexico military and police, I say consider it a rifle.”

He also said asylum seekers must go to ports of entry in order to make a claim. He promised an executive order sometime next week that would ban migrants from claiming asylum if they cross the border illegally, and would set up vast tent cities that would hold anyone coming over the border.

U.S. immigration laws say migrants seeking asylum can do so no matter how they arrive at the U.S. Under the Immigration and Nationality Act, migrants claiming asylum are allowed to do so at the border crossings, but also if they cross illegally.

A U.S. official says the first 100 or so active-duty troops have arrived at the U.S.-Mexican border, to provide support for border patrol agents.

A migrant carrying the flags of Mexico and Honduras walks along the highway as a thousands-strong caravan of Central Americans hoping to reach the U.S. border moves onward from Juchitan, Oaxaca state, Mexico on Thursday. Thousands of migrants resumed their slow trek through southern Mexico on Thursday, after attempts to obtain bus transport to Mexico City failed. (Rebecca Blackwell/AP)
A migrant carrying the flags of Mexico and Honduras walks along the highway as a thousands-strong caravan of Central Americans hoping to reach the U.S. border moves onward from Juchitan, Oaxaca state, Mexico on Thursday. Thousands of migrants resumed their slow trek through southern Mexico on Thursday, after attempts to obtain bus transport to Mexico City failed. (Rebecca Blackwell/AP)

The troops are doing initial assessments at the port of entry in McAllen, Texas. An official says there are about 2,600 U.S. troops now at staging bases, largely in Texas, with several thousand more expected to flow in through the weekend and move into California and Arizona.

The official spoke on condition of anonymity to provide details not yet released.

The Pentagon says more than 7,000 active-duty troops are being sent to the Southwest border, with more possible. President Donald Trump has said the number could reach 15,000.

The caravan of migrants is still hundreds of miles from the border.

With reporting from staff writer Kathleen Curthoys.