Zoo trade in baby elephants banned internationally
Parties to the Convention on International Trade in Endangered Species (Cites) decided to tighten the rules after days of debate.
The European Union decided to back the ban late in the day, despite concerns, and the move passed by 87 votes to 29.
But Zimbabwe, the main exporter, voted against, as did the United States.
Zimbabwe and Botswana, which have healthier elephant populations than other African nations, have been permitted to export elephants to "appropriate and acceptable" destinations.
Under that rule, the country has captured and exported more than 100 baby elephants to Chinese zoos since 2012, Humane Society International says.
Tuesday's decision significantly strengthens the restrictions on the elephant trade.
Now elephants can only be taken from the wild and placed in "captive facilities" elsewhere in the world under exceptional circumstances - and subject to approval by a committee of Cites members.
The ban was approved by committee last week, but it was far from certain to pass a new vote at the end of the two-week conference. Zimbabwe had campaigned fiercely against the move, and the EU had initially opposed it because of concerns over genetic variation in zoos around the world.
But the EU changed its vote after some amendments were made to allow trade in exceptional circumstances, and once it was made clear that elephants already in zoos could be transferred between them.
"It doesn't mean that no elephant will ever be taken from the wild and put into a captive facility overseas," said Will Travers, president of the Born Free Foundation.
"But it's going to tighten it up so much that mass shipments of elephants to zoos in the Far East, for example, simply won't happen."
Humane Society International said it was "celebrating a momentous win".
"Despite compromise language being introduced by the EU, we are relieved by its passing," said Audrey Delsink, the group's Africa wildlife director.
She said the highly sociable animals found separations "incredibly traumatising".
"Speaking personally as an elephant field biologist, I am jubilant that we have secured this victory for all the elephants who will now be spared the ordeal of being ripped away from their families."
Some African nations had pushed for a re-opening of the ivory trade during the convention, arguing that existing stocks - confiscated from poachers or left over from already-dead animals - were worth vast sums of money that could be used for conservation.