When the International Olympic Committee (IOC) put weightlifting's place on the Games schedule under threat on June 9, 2017, there were many within the sport who feared the worst, with good reason.
IOC President Thomas Bach said weightlifting had a "massive doping problem" and since then, as if to prove it, Uzbekistan's Ruslan Nurudinov, the Ukrainian Oleksiy Torokhtiy and Sopita Tanasan and Sukanya Srisurat from Thailand have been among those who tested positive.
All four are Olympic champions and another, the Colombian Oscar Figueroa, was briefly barred from competing for failing to alert testers of his whereabouts.
In August, there was news of suspensions for 12 Russian lifters, for historic doping violations based on information from the World Anti-Doping Agency (WADA) rather than positive tests, and an audacious failed attempt by Thailand to overturn its self-imposed ban for multiple doping offences.
Since Bach's words of warning two years ago, when the sport was effectively put on probation, there have been more than 80 doping violations by international weightlifters from all over the world, some of them second or even third offences by serial dopers.
While the International Weightlifting Federation (IWF) has been catching cheats, within the same time span it excluded about 200 athletes from various competitions for failing to update their whereabouts information that is so important to out-of-competition testers.
Thailand voluntarily withdrew from international competition after nine of its 2018 IWF World Championships team tested positive, three of them gold medallists and two of them Olympic champions.
Turkmenistan, the World Championships host nation, appointed a suspended doper as a coach; Ilya Ilyin, twice disqualified from first place at the Olympic Games for doping, was allowed to compete again for Kazakhstan after winning a legal challenge on a technicality; Lin Tzu-chi, a former world record holder from Chinese Taipei was banned for eight years when WADA challenged a punishment it considered too lenient; and the number of retrospective weightlifting positives from Beijing 2008 and London 2012, revealed by IOC retests, rose to 55.
And yet, despite all this and the potentially damaging publicity that goes with it, weightlifting is in a far better place now than it was when the IOC put it on probation just over two years ago.
There is much work yet to be done, and the retesting of samples from Rio 2016, whenever it happens, could lead to more damaging headlines.
But the threat of expulsion from the Olympic Games has been lifted, legal challenges from nations that cannot send full teams to Tokyo 2020 have been seen off or dropped, the new Olympic qualifying system is a huge success, and more nations are winning medals.
The IOC is impressed.
Cheating is riskier than ever before and policing is tougher, as shown by the Russian suspensions, which led Tamás Aján, President of the IWF, to say: "While the IWF has done so much to begin a bright new chapter for our sport, we will also do what we can to pursue historical cases of doping."
Thailand's attempted U-turn was swiftly blocked, and organisers are confident that this month's 2019 IWF World Championships in Pattaya will be the cleanest for many, many years.
How did that happen?
With forward planning and brave decision-making, through a strong relationship with the IOC, a complete overhaul of the Olympic qualifying system, a new partnership with the International Testing Agency (ITA) and advances in testing science, and, perhaps above all, through turning to "outsiders" for help, to a group of people who have never worked in weightlifting and, in most cases, never so much as lifted a barbell.
Among them are Richard Young, a heavyweight American lawyer who represented the US Anti-Doping Agency in high-profile cases against Lance Armstrong, Marion Jones and others; Hans Geyer, deputy head of the Institute of Biochemistry at Cologne University's Centre for Preventive Doping Research; Billy Gannon, manager for international client services at the Canadian Centre for Ethics in Sport; Kate Mittelstadt, director of anti-doping for Ironman; and Andrea Gotzmann, President of the German National Anti-Doping Agency.
Along with many more experts with similar high-profile backgrounds, they sat on various commissions and monitoring groups that were created by the IWF during a period when weightlifting underwent the biggest makeover in its modern history.
One of the sport's senior figures called 2016 "the worst year ever" for weightlifting, but it was during that year that the recovery started, long before the IOC's threat of Olympic exile was announced.
"This journey actually started in 2016 when the IOC made the reanalysis of the Beijing 2008 and London 2012 Olympic Games samples," said Attila Adamfi, director general of the IWF.
The IWF received a letter from the IOC on May 26, 2016 about the early retests, and four days later Adamfi went to Lausanne, with anti-doping chair Patrick Schamasch, to meet the IOC's sport director, Kit McConnell, and medical director Richard Budgett.
On the same day, May 30, the IWF sent a letter to Bach outlining the proposed measures to be taken for Rio 2016, which included an outright ban for Bulgaria.
After the publication of the McLaren Report in July, Russia, too, would be banned outright.
Both those nations failed with appeals to the Court of Arbitration for Sport (CAS), with the Russian case being heard in Rio only five days before competition started.
There were reduced quota places in Rio for Belarus, Romania, Uzbekistan, Azerbaijan, Kazakhstan, North Korea and Moldova, plus an increase in testing and enforced entourage registration.
"I believe the IWF was the only International Federation with a special anti-doping policy for the Rio 2016 Olympic Games," said Adamfi.
Another important pre-Rio moment came in June 2016, when the IWF Congress was held in Georgia.
There was news of doping violations involving 115 nations in the previous year, and a report about those IOC retests from Beijing and London.
The Executive Board voted unanimously to punish any nation with three or more positives in the IOC retests with a one-year ban – the famous "Tbilisi decision".
"From all of this, I hope it is clear that the IWF was already at the forefront of the anti-doping fight, before the IOC Executive Board decision of 2017," said Adamfi.
"The IWF had not waited for the IOC's reanalysis and was already committed to significant steps in protecting clean sport."
In 2017, Bach's "massive problem" statement came less than two weeks after a tense IWF election in Bangkok, Thailand.
In setting out his campaign to become President of the IWF, Antonio Urso, head of the European Weightlifting Federation and mastermind of a notable, and "clean", improvement in Italy's performances, said weightlifting had just endured "the worst year in its history".
It became personal when he said Aján, the incumbent who had been vice-president or President of the IWF since the 1970s, was "the Sepp Blatter of weightlifting".
Aján, who has been a member or honorary member of the IOC throughout this century and has sat on IOC Commissions since the 1980s, won the election by 25 votes.
Since then the IWF has made a number of significant changes: adopted a new Olympic qualifying system; signed over its anti-doping programme in a partnership with the ITA; turned to independent advisers from outside the sport; adopted new bodyweight categories that produce new, hopefully untainted, world records; and come down hard on past offenders – which has led to a lot of time spent in courtrooms.
As a result, weightlifting's credibility rating within the Olympic Movement has improved to such an extent that it has been held up as a role model by Bach himself.
What the level of progress would have been under a different leader is impossible to say, and nobody doubts that there is much more to be done or that the IWF could have been tougher on doping in decades past, but Aján has used his IOC connections to great effect to oversee a remarkable turnaround.
It is all the more remarkable given the make-up of the new IWF Executive Board after that 2017 election.
Long-standing members with decades of experience paid the price for backing Urso, including the outspoken anti-doping campaigner Sam Coffa from Australia, Christian Baumgartner from Germany, Moira Lassen, the Canadian head of the Women's Commission, and China's IWF vice-president Ma Wenguang.
Seven of the current Board's 21 members are from nations with a doping past, all of whom will be sending reduced teams to Tokyo 2020 because of new policies which they themselves approved.
Two nations with representatives on the Executive Board, Kazakhstan and Russia, took legal action against the IWF, as did Belarus: none was successful.
There may have been arguments along the way, but Adamfi praises the Executive Board for its "brave decisions and continuous support".
That support was crucial as soon as the IOC made its pronouncement, in Lausanne, that weightlifting must put its house in order.
The IOC also announced a reduction in overall quota places for the sport, down by 64 to 196, with seven bodyweight categories each for men and women in the 2020 Games.
Fortunately for the IWF, an Executive Board meeting was scheduled in Tokyo for June 13 and 14, only four days later – and it was here that the idea of creating two new Commissions, made up of external experts, was adopted.
At the outset the Commissions had no name and no members, but the idea was put in place, by Adamfi, for one of them to focus on new bodyweight categories, both for the Olympic Games and other IWF events, and the other on anti-doping.
They eventually became known as the Sport Programme Commission and the Clean Sport Commission and the significance of their input into developments over the next two years cannot be overstated.
Expertise came most notably from Germany, Canada, and the United States, from scientists and administrators at the forefront of anti-doping, lawyers and specialists in sporting ethics.
All of them played their part in helping weightlifting to improve its standing within the Olympic Movement but none more so than Matthew Curtain, the man who had first developed an individual qualifying system for weightlifting.
"Our success was a united team effort," said Adamfi. "It would be very long to list all the individuals involved in the Sport Programme Commission, Clean Sport Commission and so on.
"However, I would like to highlight one colleague, Matthew Curtain, whose contribution, especially to the Olympic qualification system, was unique."
Curtain had been involved in the sport for many years, as a lifter for Australia and then in other roles, including competition manager at London 2012, before he became director of sport and international relations at the Commonwealth Games Federation.
He developed an individual qualifying system for the 2018 Commonwealth Games in Gold Coast, Australia, which was used as the basis for a new IWF system that immediately gained favour from the IOC.
Athletes who want to compete in Tokyo are compelled to enter six competitions in 18 months, which makes it all but impossible for anyone to dope without being caught.
The IOC also showed strong support for the Tbilisi decision, which was enforced in September 2017 after months of delays, and was more than happy to see past offenders punished.
There was constant encouragement from the IOC.
Besides two face-to-face meetings between Aján and Bach in July 2017 and July 2018, there have been many, many more meetings in the past two years, all of which have helped the IWF incrementally to clean up the sport and its own image.
Adamfi has met McConnell and his team more than 20 times.
"I went to see them almost every month," he said. "We had a continuous coordination and partnership with the IOC, who supported our approach all the way.
"The relationship with the IOC has always been proactive and encouraging – I would proudly describe it as a partnership.
"The IOC stressed its support for the new Olympic qualifying programme at an important meeting in August last year.
"We would like to repeat our special thanks to Kit McConnell, and to Niccolo Campriani, strategic projects manager, for their continuous constructive, dedicated and professional cooperation and partnership."
Ursula Garza Papandrea, head of the IWF Women's Commission, said the IOC made it clear to the Executive Board that "there needs to be consensus of support for these new measures".
It was not always straightforward at Board meetings, said Papandrea, President of USA Weightlifting, who has sat on the Executive Board throughout the period of change.
"The new policies were voted in unanimously but that doesn't mean there was no dissent," she said.
"The pressure from the IOC was enough that everyone understood that the measures that had to be taken were going to be painful for some.
"When the Commissions were presented it seemed a smart way to handle the issue without having to complicate it with politics.
"The people on the Commissions were such high-profile names in the Olympic Movement there was no pushback on who was going to be involved, there was no 'this guy is biased'.
"Once we started getting the product of the Commissions, and the Olympic qualifying programme was outlined, there began to be some negative sentiment about the impact on certain countries, and how some members would have to explain to their own federations that they were going to have limited quotas for Tokyo, and they were sitting on the body that made this decision.
"The penalised countries were not happy with the pressure from the IOC, but most understood the necessity of focusing on the future of the sport rather than their own country's interests.
"When the impact of decisions started to have an effect, there were a lot of questions about why we are going so far back [counting offences from 2008].
"Some wanted to wipe the slate clean, or said they were being punished twice, and we had to explain that it was the history of the offences that needed to be addressed.
"At times they were vocal, which is understandable, and it caused some splits in groups that used to have a common view – it started to create fissures.
"But why fight against the obvious?
"Either we're going to compete clean or we're not going to be in the Olympics."
During the "clean-up" period of 26 months since the IOC's 2017 statement, there have been five meetings of the two new Commissions, and new policies have been ratified at eight IWF Executive Board gatherings and five Congresses.
There have been six key dates in the new partnership with the ITA since last November, involving the takeover of various aspects of the anti-doping programme, and there will be a sixth at the Pattaya World Championships when the ITA take control of in-competition testing.
March 2019 was a momentous month in the process.
First, Thailand voluntarily withdrew from international competition because of its doping problems.
Later, in the same week, Kazakhstan dropped its contentious CAS complaint about the fairness of the new Olympic qualifying system, and the IOC announced that weightlifting's place at Paris 2024 was guaranteed, provided the IWF completed the formalities of its partnership with the ITA.
Also in March, a name to remember. Yessenkeldi Sapi made six good lifts to win the 81 kilograms gold for Kazakhstan at the Youth World Championships in Las Vegas.
A CAS statement relating to that dropped Kazakhstan case praised the national federation for its work in cleaning up the sport, so perhaps Sapi will be the first of the next generation of young Kazakh lifters in weightlifting's new era.
Four separate reports were presented to the IOC before, in May this year, the ITA partnership was signed off and the "conditional" status of weightlifting at Paris 2024 was officially removed by the IOC.
The first IWF report had been submitted in December 2017, so it took a while, but there was no party at the Budapest headquarters of the IWF when clearance was given three months ago.
"No celebration was held but obviously the positive feedback and support during the whole journey encouraged us and the many congratulations recently received confirmed that our efforts, meetings, discussions, constructive debates, sleepless nights, and extensive travels were all worth it, to elevate our sport to a new level," said Adamfi.
"While we were naturally not happy that the final confirmation took some time, the IWF was always confident it would meet the challenges set.
"Having the IOC President speak in front of other IFs and giving weightlifting's Olympic qualification system as an example of what to do right [at SportAccord 2018] was very encouraging.
"Like our athletes, we will keep pushing hard until Tokyo 2020 and beyond, and we may enjoy a moment to look back after a successful competition there."
If anybody deserves special praise for weightlifting's recovery, said Papandrea, it is Adamfi.
"He crosses boundaries in working with the Commissions and then presenting their decisions to us," she said.
"He understands what can and can't be done, the needs of the weightlifting community.
"His role is really pivotal in getting the Board not just to agree but to carry through on those decisions.
"We're dependent on him."
Adamfi said he was "honoured and privileged to lead this process under Dr Tamás Aján's and the Executive Board's guidance".
Papandrea also had a word of warning about the future, and stressed the importance of keeping the Commissions in place after Tokyo 2020.
"It would be a mistake to abolish them quickly," she said.
"Any group that is independent of us that the IOC realises is more objective, and our willingness to maintain those groups, shows an expression of a desire to continue to clean up the sport.
"If the Commissions keep working, it shows we are not worried about independent bodies having input to our anti-doping policies.
"We can't rely on NOCs and NADOs to continue to police themselves.
"Maybe one of the Commissions can make suggestions of how we can continue to create a clean environment until the start of the next qualifying period – or maybe you do something that makes you eligible for that next qualifying period.
"Once you let up that's the moment when things start to revert.
"If the Executive Board makes any decisions that can be interpreted as lenient towards doping, they will certainly endanger our Olympic status.
"Although the sport has turned a corner, the leaders are aware they remain under the watchful eye of the IOC.
"The sport has abated the immediate threat but the goal must be to become a beacon for those other sports that have doping problems to deal with."
Adamfi said the overhaul of weightlifting would continue.
"Ensuring 2024 Olympic Games participation is not a goal, it is just a tool to achieve our broader objectives, a milestone in our long-term plans. We do not stop, we continue our efforts," he said.
"There was a united team effort behind the success, an inclusive approach and wide involvement of our stakeholders and independent experts.
"The IWF looked beyond a set of straightforward measures, towards a combination that added up to sustainable culture change. Our approach was always much broader than what was requested by the IOC.
"I considered the IOC decision as a possibility given to the IWF, a trigger to make and lead changes, not to follow and be changed. This was the opportunity to relaunch the sport to a certain extent.
"Even if in the short term our bold approach might reveal more positive cases, we believe every case delivers a message that if they cheat, dopers will be caught.
"It all serves the long-term objective of cultural change aimed at ensuring a bright and sustainable future for our sport."