Geoff Gilbert, a professor of international human rights and humanitarian law at the University of Essex in Britain, said that while all countries have the right to control who comes into their territory, “that doesn’t give authorities in the United States the right to fire tear gas into another country.”

He cited language in the United Nations Charter on the sovereign rights and obligations of member countries. Article 2, for example, says that members “shall refrain in their international relations from the threat or use of force against the territorial integrity” of other members.

If the migrants had been in United States territory and presented an immediate threat, Mr. Gilbert said, border protection agents might have been justified in using tear gas to disperse them under certain conditions.

Alastair Hay, a professor of environmental toxicology at Leeds University in Britain, said the tear gassing was “clearly a violation of another country’s territory” and an interference in Mexico’s affairs.