The images of immigrant mothers and their young children choking on tear gas at the U.S.-Mexican border become even more jarring with this realization: The use of this chemical weapon is not allowed in warfare.

But the tactic is perfectly legal when employed on civilians.

The appropriateness of government officers using tear gas to turn back a group of immigrants who rushed the border south of San Diego on Sunday has come under intense scrutiny, much like it did when those methods were applied on protesters during the Ferguson riots of 2014.

Although there’s plenty of debate about the suitability – or even effectiveness – of relying on that kind of chemical agent, its legality is not in question.

The Chemical Weapons Convention of 1993, signed by almost every country in the world, banned the use of tear gas on battlefields but allowed the practice for domestic law enforcement and crowd control.

Customs and Border Protection agents were on solid legal footing when they employed tear gas on the immigrants who split off from a peaceful demonstration in Tijuana – even when it affected women and children.

The strategy was largely successful in keeping the immigrants at bay but drew strong rebukes from many Democratic leaders – including California Gov.-elect Gavin Newsom – who expressed horror at the sight of kids crying in agony and running away in terror.

“Tear gas is considered a riot control agent because the effects dissipate a short time after exposure,’’ said Kelsey Davenport, director for nonproliferation policy at the Arms Control Association. “But even though the effects of tear gas wear off, its symptoms are harsh and terrifying, including severe eye irritations and difficulty breathing.

Related:Stay or go back? Uncertainty grips immigrants waiting in Tijuana after tear gas incident

More:Donald Trump says border agents who used tear gas on migrants were being 'rushed'

“The United States may justify firing tear gas across the border as legal, but the decision to use an indiscriminate, psychologically terrifying toxic chemical was excessive and certainly immoral."

The odd juxtaposition of a weapon banned in combat but approved for use on civilians stems from a desire to clarify conditions at war and avoid escalation.

Richard Price, a political science professor at the University of British Columbia and author of the book “The Chemical Weapons Taboo," said Iraq’s chemical warfare on Iran in the 1980s prompted the treaty in 1993, which banned the production, stockpiling and use of such weapons.

Tear gas, also known as CS gas, was included on the list largely to avoid confusion at war but was granted an exception for law enforcement purposes.

“It’s one of the really strange situations we have in attempts to restrain various weapons of violence, because you actually have tighter restrictions on the use of this particular method than you do in domestic policing,’’ Price said.

“The idea is that, if you’re only going to ban certain chemical weapons and not others, then clearly in the fog of war, it becomes impossibly confusing. If you’re a soldier in the field and you see a gas shell exploding around you, you’re not going to sit around and go, ‘Is that mustard gas? Sarin? Tear gas?’ "

Department of Homeland Security officials defended the use of tear gas – which causes nose and throat irritation, as well as coughing and a choking sensation – as the least harmful way for CBP agents to defend themselves as they were pelted with rocks and bottles from the other side of the fence.

They said the approach would be used again, if required, and those who wanted to avoid its effects should steer clear of violent protests.

“We don’t target women and children,” said Rodney Scott, chief Border Patrol agent in the San Diego sector. “If women and children choose to insert themselves into a violent crowd that is attacking police officers with rocks and bottles, there are going to be unintended consequences.”

Those are especially noxious for children. Sven Jordt, an expert on chemical weapons at Duke University, said how somebody reacts to tear gas depends on its distance, concentration and the person’s health status. The impact could last as little as 10-20 minutes.

Children are more vulnerable because of their size and the likelihood they don’t know to cover their mouths and close their eyes to minimize the harm.

“Tear gas is heavier than air, so the concentrations are higher lower to the ground," Jordt said. “Children also have much smaller lungs, so if they inhale it, they are exposed to higher levels. And obviously, they cannot understand what’s happening to them, this pain developing, so they also develop much more anxiety and fear response."

Jordt said there have been no conclusive studies looking at the long-term effects of tear gas on minors, but he’s concerned its use might increase through new methods of delivery. In March, Israeli drones dropped tear gas on Palestinian protesters in Gaza.

He questioned its effectiveness, pointing out cases in Egypt, Turkey and Europe when protesters committed acts of terrorism after being hit by the chemical agent.

“It’s a slippery slope," Jordt said. “It may be effective against some populations immediately, but the long-term effect on people’s behavior to refrain from acting against the law or the government is really unclear."

Contributing: Bart Jansen, USA TODAY