Dan RoanBBC chief sports correspondent in Buenos Aires
"Wrestling was axed back in February and it has waged a very successful campaign ever since then to be reinstated.
"Wrestling, squash and baseball/softball have all spent millions of pounds on their campaigns to convince the IOC they should be in the Olympics.
"The IOC will have to address their policy on inclusion into the Olympics. It is a controversial decision.
"It will be interesting to see how the votes for wrestling and Tokyo to host the 2020 Olympics will affect the vote to name the next IOC president."
Wrestling - which was the favourite - received a majority of 49 votes, while a combined baseball/softball bid got 24 votes and squash 22.
The sport - one of the original disciplines at the Ancient Olympics - had been due to end its Olympic participation at Rio 2016 following its dismissal by the IOC earlier this year.
English 2010 Commonwealth bronze medallist, Leon Rattigan, told BBC Sport: "I am so pleased that the pinnacle competition to which we all aspire is saved.
"Wrestlers across the world continue to have something to work for."
Members of amateur wrestling's world governing body, the International Federation of Associated Wrestling Styles (Fila), gave a roar when the result was announced by IOC president Jacques Rogge.
Wrestling's triumph in the vote follows a number of sweeping reforms made following its exclusion, including overhauling its rules, administration, gender equality and operations.
Fila president, Nenad Lalovic, said the IOC would not regret its decision: "With this vote, you have shown that the steps we have taken to improve our sport have made a difference.
Who struck wrestling gold at London 2012
"I assure each of you that our modernisation will not stop now. We will continue to strive to be the best partner to the Olympic Movement that we can be."
Earlier on Sunday, Lalovic had declared during wrestling's presentation to IOC members: "Today is the most important day in the 3,000-year history of our sport."
British Wrestling chief executive, Colin Nicholson, told BBC Sport: "In Britain we will now re-focus on growing participation in this Olympic sport."
Squash suffered its third failed bid to take part in the Games for a first time. It had topped an IOC vote in 2005 for Olympic inclusion but failed to get the required two-thirds majority. It then failed again in 2009.
"Today's decision is heart-breaking for the millions of squash players around the world, particularly given the 10-year journey we have been on to join the Olympic Games Sports Programme," World Squash Federation president, Narayana Ramachandran, said.
"As the only new Olympic sport on today's shortlist, we believed squash offered something for the future and I still hope that our inclusion may still be possible."
Who deserves a 2020 Olympic place?
Baseball/softball - which had the son of ex-Cuban leader Fidel Castro, Antonio Castro, in its presentation team - last featured at the Beijing Olympics in 2008.
Wrestling, which combines freestyle and Greco-Roman events, was included in the inaugural modern Olympics in Athens in 1896.
It has been in every Games since, apart from Paris in 1900. At London 2012, it featured 344 athletes competing in 11 medal events.
The success of its bid showed the sport had not suffered from a reprimand its federation received last week from the
IOC for breaching rules.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.