States party to the Convention on International Trade in Endangered Species (CITES) approved the measure following a heated debate in Geneva on Tuesday.
Zimbabwe , which along with Botswana provides most of wild African elephants to zoos outside of the continent, opposed the move and tried in vain to block the vote.
The United States also voted against. However, with 87 in favour, 29 against and 25 abstaining, the measure secured the two-thirds majority needed to pass.
The decision only impacts African elephants. Asian elephants already enjoy more protection against international trade.
The initial CITES vote was to limit the trade in live wild African elephants to conservation in their natural habitats, basically ending the practice of capturing elephants and sending them to zoos and entertainment venues around the world.
The European Union hinted it might join the US and others in flatly opposing the text.
This prompted an outcry, with a number of public figures including Jane Goodall, Pamela Anderson and Brigitte Bardot sending a letter to EU Commission chief Jean-Claude Juncker asking that the EU back the ban.
In the end, the EU drafted an amended text, adding a loophole, saying the elephants should remain in their "natural and historical range in Africa, except in exceptional circumstances".
This would allow for an elephant already in France to be shipped to nearby Germany without having to be sent back to Africa first, conservationists explained.
Such decisions should still only be made in consultation with the CITES Animals Committee, and the International Union for Conservation of Nature (IUCN) elephant specialist group.
Audrey Delsink, the wildlife director at Humane Society International (HSI)'s Africa division, welcomed the outcome of Tuesday's vote.
"This is a momentous CITES decision for Africa 's elephants," she said, while also expressing disappointment that CITES had failed to impose an outright ban.
However, she said she was happy the new text allowed for independent oversight and scrutiny.
"It adds a layer of transparency, which is critical so that these situations can be very, very clearly evaluated by definitions produced by these bodies," she told AFP news agency.
DJ Schubert, a wildlife biologist with the Animal Wildlife Institute, agreed on the need to watch the implementation of the EU caveats "very closely."
Overall though, he told AFP the text agreed on Tuesday "is certainly a start."
"It is a signal I think to the world that it is time to move beyond the idea that it is appropriate to keep elephants in captivity."
While elephants in western, central and eastern Africa have long been listed among the species in need of most protection under CITES, and thus banned from all trade, some trade has been permitted in southern Africa, where elephant populations are healthier.
Zimbabwe has for instance captured and exported more than 100 baby elephants to Chinese zoos since 2012, according to the HSI. DM
Photo: Tony Weaver