Tijuana, Mexico -- U.S. authorities fired tear gas into Mexico during the first hours of the new year to repel about 150 migrants who tried to breach the border fence in Tijuana. U.S. Customs and Border Protection said in a statement later Tuesday that the gas was used to target rock throwers apart from the migrants who were trying to cross.

"No agents witnessed any of the migrants at the fence line, including children, experiencing effects of the chemical agents, which were targeted at the rock throwers further away," the statement said.

An Associated Press photographer saw at least three volleys of gas launched onto the Mexican side of the border near Tijuana's beach that affected the migrants, including women and children, as well as journalists. The AP saw rocks thrown only after U.S. agents fired the tear gas.

Migrants run as tear gas is thrown by U.S. Border Protection officers to the Mexican side of the border fence after they climbed the fence to get to San Diego, Calif., from Tijuana, Mexico, Tuesday, Jan. 1, 2019. Daniel Ochoa de Olza / AP

The agency said agents saw "toddler sized children" being passed over concertina wire with difficulty. It said its agents could not assist the children because of the rocks being thrown. Agents responded with smoke, pepper spray and tear gas, it said. The AP journalist also saw plastic pellets fired by U.S. agents.

Get Breaking News Delivered to Your Inbox

"Agents observed several individuals throwing rocks who appeared to have prepared themselves for the assault by applying lotion to their faces to counter the effects of chemical munitions," Rodney Scott, chief patrol agent of the U.S. Border Patrol's San Diego sector, said in a statement posted on Instagram. "Several arrests were made, all individuals from central America. No injuries were sustained by either the agents or individuals arrested."

The agency said 25 migrants were detained while others crawled back into Mexico through a hole under the fence.

Customs and Border Protection said that under its use of force policy the incident would be reviewed by its Office of Professional Responsibility.

Migrants who spoke with AP said they arrived in Tijuana last month with the caravan from Honduras.

The caravan, which left Honduras in mid-October, grew to more than 6,000 members during its month-and-a-half trek north. It has been a constant target of President Donald Trump, who referred to it frequently in the run-up to U.S. mid-term elections in November.

Many of the migrants are waiting in Tijuana for a chance to apply for asylum in the U.S., but there was a backlog before the caravan's arrival and the wait is expected to be many months. Others have found jobs in Mexico and tried to settle there.

In a previous incident, U.S. agents launched tear gas across the border after some migrants tried to breach the border following a peaceful march in Tijuana on Nov. 26. Hundreds of migrants who were downwind of the gas were affected.

Mr. Trump is currently locked in a fight with congressional Democrats over funding for the border wall that he wants to build. The stalemate has led to a partial government shutdown.

Mr. Trump invited congressional leaders of both parties to the White House on Wednesday for a "briefing" on border security, according to a congressional source.

Last week, Mr. Trump threatened to close the southern border "entirely" if he does not get the funding he needs for his border wall, saying that it would be a "profit-making operation" to do so.