It is the second time since November that border officers have used tear gas during an attempted mass migrant crossing in the San Diego area.
The migrants in the latest case New Year's Eve were among 1,500 who have remained in Tijuana, Mexico, just south of San Diego, California, after a once-5,000-strong caravan of travelers -- which raised the ire of President Donald Trump -- largely gave up and dispersed.
An AFP journalist reported the crowd size at about 100 and observed the group of Central Americans gathering around 8:00 pm Monday night (0400 GMT Tuesday) in an area called Playas de Tijuana on the Pacific coast, often used by migrants as a departure point for attempts to sneak across the border.
There, the border is marked with fencing and a large vertical plate that juts out into the water. On the other side of it, US border agents were seen mobilizing.
As night fell and people on both sides of the frontier prepared to celebrate New Year's Eve, the migrants tried to cross over but at least two smoke bombs were fired and they were ultimately held back.
Those who tried to cross included adult men, women with small children and adolescents.
After that attempt, part of the group stayed near the border and other Central Americans arrived to join them.
Shortly after the New Year began, dozens of migrants stood on a hill from which they could see US border agents, who watched them closely.
When people in this group rushed the border in a second incident, US authorities fired tear gas to disperse them, an AFP photographer observed.
In a statement, US Customs and Border Protection (CBP) said an initial group of 45 migrants turned back towards Mexico, due to the increased presence of Border Patrol agents. Shortly after, migrants began throwing rocks over the fence at CBP officers.
"Several teenagers, wrapped in heavy jackets, blankets and rubber mats were put over the concertina wire. Border Patrol agents witnessed members of the group attempt to lift toddler-sized children up and over the concertina wire and having difficulty accomplishing the task in a safe manner," CBP said.
It added that agents could not assist the children "due to the large number of rocks being thrown at them."
- 'Minimum force' -
Agents used smoke, pepper spray and tear gas "to address the rock throwers assaulting agents and risking the safety of migrants attempting to cross who were already on the US side," CBP said.
"The rock throwers were located south of the fence, in an elevated position both above the border fence area and the incursion attempt."
Most of the migrants returned to Mexico using a hole under the fence or by climbing over it, CBP said, adding 25 people including two teenage migrants were detained.
Agents "used the minimum force necessary," Katie Waldman, a spokeswoman for the Department of Homeland Security, said in a statement.
In late November, also in the Tijuana area, US border officers used tear gas and rubber bullets when about 500 men, women and children scrambled over a rusted metal fence and surged into a concrete riverbed before they encountered a second fence.
Rights groups raised questions over the use of force, in which at least one man was wounded. CBP said 42 people were arrested on the US side.
The migrants in both cases were part of a caravan that left Central America in October and traveled 4,300 kilometers (2,600 miles) to Tijuana in the hope of reaching the US and requesting asylum. Many were fleeing gang violence and poverty.
They arrived in Tijuana in early November and today about 1,500 still remain. The rest asked to be transported back home or dispersed to other parts of Mexico.
Trump used the caravan to stir up fear of immigrants as he pressed his drive to build a wall on the border. He has also made it harder for people to request asylum at the frontier.
An impasse with legislators over funding for his border wall project is behind a partial shutdown of US government services which is now in its second week.