The three-and-a-half reverse somersault with tuck – officially known as dive 307C – is one of the most difficult in the sport. It was added to the table of dives in September 1982, and Greg Louganis started working on it immediately. Initially he stayed on the ground, using a spotting belt – a device used to help gymnasts practise particularly complicated dismounts – until he had perfected the action. When it was time for him to first attempt the dive for real, Louganis climbed up to the platform, 10m – a little higher than two double decker buses – above his practice pool, and froze.

“He wouldn’t go,” his coach, Ron O’Brien, said. “He’d stand on the end of the platform and stand and stand, and step back. I told him he just had to learn that dive, that he could bring his lunch and dinner the next day, because he was going to stay up there till he did do it.”

Louganis conquered his fear, as he had conquered fear before. “When I first started coaching him, he wasn’t a real happy kid,” said O’Brien. “He was always a brave, strong diver, but he was a scared kid. Scared of so darn many things.”

“The thing about fear is that sooner or later you have to face it down,” said Louganis. As a child he developed ophiophobia, a fear of snakes. Many people are similarly afflicted, but few react how Louganis did: he saved up and bought one. “A boa constrictor,” he said. “Not too big, but a serious snake.” He fed his snake dead chicks every day until he was cured.

In 1983 Louganis went to the World University Games in Edmonton as one of the few men in world diving able to execute the 307C. The only other one present was the Soviet Sergei Chalibashvili, and coincidentally the American ended up preparing to climb the ladder and execute the dive immediately after his rival. He was on the steps as Chalibashvili launched himself into the air and started to spin, but deliberately chose not to watch. It was just as well: Chalibashvili had not given himself enough room. He hit the concrete platform with his head, shattering his skull. He never regained consciousness. “I knew something terrible happened when I felt the tower shake,” he said later. “I heard screaming. I ran to the edge of the [practice] platform and saw a lot of blood in the pool. I wanted to jump in after him, but people were yelling, ‘Don’t touch him! Don’t touch him!’ I couldn’t watch any more.”

How times have changed over the past 30 years. When the Bolton footballer Fabrice Muamba collapsed in the middle of a match against Tottenham a fortnight ago, his life in grave danger, the match was quite properly abandoned. In Edmonton in 1983, less than half an hour after Chalibashvili was dragged from the pool, Louganis was looking down from the platform at the bloodied water below and preparing to attempt the very same dive (after that day the 307C became known as the Dive of Death, and was also responsible for that decade’s only other diving fatality). His mind flashed back to the moment he had experienced something similar in a competition in Tbilisi in 1979, where he was saved only by the fact that the platform had been constructed out of plywood rather than concrete. He was unconscious for 20 minutes, but recovered. “It’s always there in the back of your mind, but you have to be brave, confident,” he said. “You have to block it out.”

Louganis executed his dive perfectly.

In 1984, as Louganis won two gold medals at a canter, the Guardian called him “Mr Perfect”. It isn’t a description that a young Gregory Efthimios Louganis could ever have imagined being used on him. His parents, a Samoan father and a Swedish mother, were both 15 when he was born, and gave him up for adoption when he was eight months old. As a young child he suffered badly from asthma, and had a string of allergies – pollen, animal fur, various foods. He was an undiagnosed dyslexic – his school tested him for mental impairment – and had a stutter. They certainly did not call him Mr Perfect at school, where he was more likely to be called “sissy”, “retard” or, on account of the dark complexion he inherited from his father, “nigger”. “I got beat up at the bus stop a lot,” he said. He started smoking aged nine, and drinking soon after. As a teenager he suffered from depression, and there were three suicide attempts.

Though his relationship with his adoptive father, who ran a tuna fishing fleet, wasn’t easy – “He had nothing to do with Greg until he started winning first place,” said his mother, Frances – Louganis found happiness in his mother’s kitchen, and most of all in dance. When a doctor recommended that the 18-month-old Louganis exercise regularly to build up his asthma-addled lungs, he was taken to his sister’s tap class; by the age of three and a half he was performing solo routines. He excelled at gymnastics, and discovered a particular talent for the trampoline. When the family moved to a new house with a swimming pool, it wasn’t long before Louganis started attempting to replicate his trampoline moves on the diving board. His terrified mother decided he had better get some lessons. He was eight years old.

“I didn’t speak much as a kid, because everybody laughed at me,” Louganis said. “It was so frustrating. At home I would start a sentence and my sister would finish it. She wasn’t with me at school, so I just shut up. I decided to direct all my time and energy into something I could be proficient in. I wanted to show people I could do something. I liked to dance, tumble, do gymnastics and dive, so I totally homed in on my physical attributes.”

At the age of nine, Louganis began to complain of pains in his legs. Doctors diagnosed an issue with the way his knees were growing and warned him to stop practising gymnastics or risk permanent disability. He ignored them, but grew up with a slight bend in his legs. This was far from a disability, however: it created a gap through which he could see even when his head was tucked up against them, when most divers are effectively blinded by their bodies. This was to give him a unique competitive advantage.

O’Brien first saw him when he was 10, and remembered a boy with “a different quality to his diving than I had seen with anyone else. He was stronger, and he had a presence about him.” At the Junior Olympics the following year he caught the eye of Dr Sammy Lee, an ENT specialist but more relevantly an Olympic diving gold medallist in 1948 and 1952. “The first time I saw him I knew he would be the greatest diver in history if he got the right coach,” said Lee. The pair met for the first time in 1975, when Lee offered to be that coach. Within weeks Gregory had moved in, and the pair started working full-time to prepare for the Montreal Olympics. At the trials, Gregory came first on both springboard and platform.

In Montreal, though, Louganis was struck by toothache. Distracted, he finished sixth in the springboard event and decided to seek help. Scared of failing a drugs test, he refused pain relief as the dentist took out his drill. The following day he won a silver medal. At the ceremony the Italian Klaus Dibiasi leant down at the 16-year-old from the gold medal platform and whispered: “In four years, you’ll be up here.”

He would almost certainly have been right, but for the US team’s decision to boycott the 1980 games in Moscow. By then, Louganis was acknowledged as the best in the world. At the world championships in Guayaquil, Ecuador, in 1982 he became the first person in a major international meeting to get a perfect score of 10 from all seven judges. The next time he was beaten, in any competition, was in 1987. At the 1984 Olympics he destroyed the field – his tally of 754.41 points in the springboard event was more than 100 better than his nearest rival. In the platform his total of 710.91 was the highest in the history of the sport, and nearly 70 points better than the silver medallist (to calm his nerves before his history-making final dive he listened to the music from Chariots of Fire on his Walkman, and talked at length with his closest friend, Gar – a teddy bear).

Louganis was one of the most famous and celebrated men in America. “He used to be very introverted, he was in a lot of turmoil,” said O’Brien. “I’ve seen him grow to be a very relaxed, confident, comfortable person who can deal with media, speak in front of crowds and just be happy.” But there was still turmoil beneath the surface.

By then Louganis was in an abusive relationship with his business manager, Jim Babbitt, who stole from him, beat him and, on at least one occasion, raped him at knifepoint. Babbitt died of Aids-related illness in 1990. In 1988, six months before the Seoul Olympics, Louganis was himself tested, and discovered that he was HIV positive. His doctor – also his cousin – persuaded him not to give up on diving, and put him on the antiretroviral drug AZT, which he took every four hours round the clock.

“Dealing with HIV was really difficult for me because I felt like, God, the US Olympic Committee needs to know this,” he said. “US Diving needs to know it because what if I get sick at the Olympic Games and am unable to compete?” But Louganis decided not to tell anyone outside his close circle. “We knew that the risk of his spreading the virus through an open cut was infinitesimal, and besides, how many times does a diver – much less Greg Louganis – get wounded?” said O’Brien. “We thought it best to keep his condition to ourselves.”

In 18 years, Louganis had by conservative estimate launched himself off a springboard about 200,000 times without ever once injuring himself, and it was nearly a decade since his one and only misjudgment on the platform. It wasn’t much of a risk. But everybody knows what happened next: in Seoul, after eight rounds of the springboard heats and with Louganis leading by eight points, he left the board too straight while attempting a reverse two and a half somersault in pike position and clattered his head as he straightened out. “I jumped off the board and heard this big clank,” he said later that day. “That’s my perception of the dive – I think my pride was hurt more than anything.”

As far as the competition was concerned, Louganis could barely have picked a better time to make the mistake. His wipe-out dropped him to fifth with two rounds to go, and he needed only to finish in the top 12 to qualify for the final. But first the cut to his head needed to be dealt with. He agonised about whether to tell the team physician, Dr James Puffer, that he was HIV positive, and decided not to. “I was so stunned,” he said. “I mean, what was going on in my mind at the time was, ‘What’s my responsibility? Do I say something?’ This has been an incredibly guarded secret.”

It was not until Puffer had finished that Louganis realised he had not been wearing gloves. “I had 10 minutes to close the wound, at least so he’d be able to dive again,” Puffer said later. “Unfortunately there were no gloves. I made the decision I was going to close it without waiting, otherwise he might not have been able to go to the next round.” After Louganis made his condition public in 1995 Puffer tested negative for HIV.

A patched-up Louganis finally emerged for his penultimate dive, a testing reverse somersault with three twists. The small crowd fell silent and watched. To the surprise of nobody who had followed his remarkable career, Louganis soared. His score of 87.12 points was the highest of any diver for any dive in the qualifying competition, and earned him a standing ovation. One more near-perfect dive saw him qualify in third place.

The following morning, Louganis got to the venue early. “He was really down,” said O’Brien. “Usually when he comes in he’s in a pretty happy state of mind and he’s joking, but this time he was very quiet. I knew he had some question marks.”

“I was very nervous,” Louganis said. “Hitting my head shook my confidence a lot. That’s the reason I worked out this morning. I did quite a few dives, more than I normally do, just to get over my jitters.”

But the competition, if not quite so straightforward as it had been in Los Angeles, was predictably serene. Louganis led after all but one (the fourth) of the 11 rounds, his nerves only apparent when he repeated the dive that had troubled him the previous day. “I was a little nervous going into the ninth,” he said. “I’m not going to deny that’s because of what happened. The fact everyone was watching me very closely made me a little nervous. I just kept telling myself: ‘Do it the way you’ve done it before. Just go for it.’ As was his habit, in the moments before diving Louganis sang to himself the song Believe in Yourself from The Wiz.

This time the dive earned him 76.50 (despite getting it wrong in nearly every way possible he had got 6.30 points for the previous day’s effort) and extended his lead over China’s Tan Liangde. His final two dives approached perfection, and he won by a margin of 25 points.

The platform final was significantly less straightforward, as the brilliantly talented 14-year-old Chinese schoolboy Xiong Ni – who was to win three gold medals at the 1996 and 2000 Games – created something of a sensation. Before the final round of dives Xiong led by three points, and he then produced an excellent effort which earned 82.56. Nothing less than perfection would save Louganis now, and that is exactly what he produced. His dive brought 86.70 points, and victory by a margin of 1.14. He retired that day, a hero. And the dive that sealed his golden success? The three and a half reverse somersault with tuck – officially known as dive 307C.

Louganis, who had studied drama at college, went into acting with limited success. In 1993 he took the role of Darius, an HIV-positive dancer, in the off-Broadway drama Jeffrey, and in 1995 he came out publicly, in an emotional appearance on Oprah Winfrey’s chat show. That year he admitted on Barbara Walters’s TV programme that he was HIV positive. Despite some outrage – the chairman of the Seoul organising committee said in the light of his disclosure that Louganis’s participation was “really regrettable” and “not morally right” – reaction was mostly supportive. Speedo, one of his main sponsors, immediately extended his deal. “It’s been so difficult, with the secrets and asking people to keep those secrets,” he said. “The rest of my life is about not having secrets, and living my life openly and honestly.”

He wasn’t the only one to express relief that the secret was out. “I’m glad that I can finally share the story of his heroism,” said O’Brien. “I never even told my wife. There are very few divers who could’ve come back from that springboard incident and won two gold medals. If that isn’t courage, I don’t know what is.”

Louganis now lives in Malibu, and spends much of his free time indulging his love of dogs – he has discovered a gift for obedience and agility training. His house has a swimming pool, but there is no diving board. It is more than 15 years since he last attempted a dive. “It’s not that I don’t want to,” he has said, “it’s just that diving’s not a sport you can do casually. It’s not like tennis or golf. If your timing is off, it can be really bad news. I have those memories of diving, those really incredible memories of diving. But that’s what they are, memories.”