Fifty years ago, Yuri Gagarin became the first man in space. Sergei Korolev built the rocket that took him. These were the face and brains of the team that beat the Americans.

It remains the one untarnished triumph of Soviet science. On April 12, 1961, a peasant farmer's son with a winsome smile crammed himself into a capsule 2.4m in diameter and was blasted into space on top of a rocket 20 storeys high.

One hundred and eight minutes later, after making a single orbit of our world, the young pilot parachuted back to Earth. In doing so, Yuri Gagarin became the first human being to journey into space.

The flight of Vostok 1 - whose 50th anniversary will be celebrated next month - was a defining moment of the 20th century and opened up the prospect of interplanetary travel for our species. It also made Gagarin an international star, and his mission was hailed as proof of the superiority of communist technology.

His flight's anniversary will give Russians a chance to reflect on the former might of the Soviet empire.

Ravaged by a war that killed more than 26 million of its citizens, the USSR learned, within a generation, how to orbit satellites, aim probes at the moon and put a man into space.

But Gagarin's flight was anything but a collective affair. In the years since the USSR's disintegration, it has become clear just one man dominated proceedings: Sergei Korolev, the chief designer - a shadowy figure who was revealed to have masterminded the USSR's rocket wizardry only after his death in 1966.

Sergei Pavlovich Korolev was born on January 12, 1907, in Zhitomir, in modern-day Ukraine.

Like Gagarin, he was besotted with flying and aeronautics and studied in Moscow under aircraft designer Andrei Tupolev.

Tupolev described his young student "as a man with unlimited devotion to his job and his ideas".

Korolev qualified as a pilot and began designing gliders to which he added rocket engines. In 1933, he launched the first liquid-fuelled rocket in the USSR.

He prospered, for he was hard-working and loyal to the Soviet system. But eventually, that was not enough. In June 1938 four secret service agents broke into his apartment and arrested him as a spy.

He was forced to admit to crimes of treason and sabotage and was sentenced to 10 years' hard labour at the Kolyma gold mine, the most notorious of all Gulag prison camps.

He survived Kolyma but lost all his teeth, his jaw was broken and he may have had a heart attack. He was, as his biographer James Harford says, just another "egregious example of the incredible stupidity, not to speak of callous cruelty, of the purges of Joseph Stalin".

After five months, Korolev was released from Kolyma and spent the next five years in jail in Moscow working on aircraft and rocket design with other imprisoned engineers.

Then, in 1945, he was made a colonel in the Red Army and sent to Germany. It was a remarkable change in his fortunes and it occurred for a simple reason - the Russians had captured Nazi stores of V2 rocket components and wanted to use them to develop their own missile system.

A gifted engineer and designer, Korolev developed the first intercontinental missile and then launched the world's first satellite, Sputnik 1.

He also put into space the first dog, the first two-man crew, the first woman, the first three-man crew, directed the first walk in space, created the first Soviet spy satellite and communication satellite, built mighty launch vehicles and flew spacecraft towards the moon, Venus and Mars - and all on a tiny budget.

But it was the first man into space that truly marked out Korolev - and Gagarin - for greatness.

Yuri Gagarin was born on March 9, 1934, in Klushino, in the Smolensk region, 160km west of Moscow. His parents worked on the local collective farm. In October 1942, the village was overrun by retreating German troops. The Gagarins were thrown out of their home and had to dig a shelter to survive the winter.

Later, Yuri's brother Valentin and sister Zoya were deported to labour camps in Poland.

Remarkably the family survived, and in 1950 Yuri was sent to Moscow to train as a steel foundryman before enrolling in the newly built technical school in Saratov, where he took up flying, becoming a military pilot.

In October 1959, a set of recruiting teams began visiting air bases across the Soviet Union.

A privileged few, including Gagarin, were selected and sent to Burdenko military hospital in Moscow where the pilot recalled being examined, intensely, by doctors.

Korolev - who had already stunned the world with the launch of Sputnik 1, the first satellite - was now preparing for his ultimate achievement, putting a human in space.

Twenty pilots were selected, but the early version of the Vostok capsule was so cramped, only those under 168cm could get in it. The slightly built Gagarin fitted in nicely.

There was no countdown on that morning of April 12, 1961 - a silly American affectation said Korolev who, at 9.06am, pressed an ignition key and the R-7 rose from the pad.

"After the launch, there was complete silence in mission control apart from an operator repeating, every 30 seconds, that 'the flight is normal'," recalls research engineer Mikhail Marov. "Then he announced the ship had reached orbit and there was huge shout of joy."

About 9.50am Vostok began its sweep over America. Half an hour later its engine was retrofired and the capsule began its descent.

Every manoeuvre had been controlled by Korolev from the ground.

"Those minutes seemed like eternity," Marov recalls. Then it was announced Gagarin had landed safely. The Soviet press agency Tass immediately broadcast details of the flight and within minutes, crowds began to fill the streets of Moscow.

"I have never seen such enthusiasm of ordinary people," says Marov. "They took Gagarin's triumph as a personal victory."

On January 14, 1966, Korolev died, aged 59, during routine surgery.

Gagarin survived his mentor by only two years, dying when his MiG-15UTI jet crashed.

Spaceman's near miss

Yuri Gagarin's famous flight came perilously close to disaster.

As it began its descent, Gagarin's capsule should have separated from the main spaceship but a cable did not detach. The capsule began to spin and tumble "like a yo-yo" as one engineer later described it, exposing unprotected areas to the searing heat of re-entry. The temperature inside rose dangerously. "I was in a cloud of fire rushing toward Earth," Gagarin recalled. Ten minutes later the errant cable burned through; the two modules separated; and Gagarin's capsule ceased its wild rotation.

The cosmonaut, who had nearly lost consciousness, blew open its hatch and was ejected, as planned, to make a parachute descent.

He landed close to the village of Smelovka, near Saratov in southern Russia. "I saw a woman and a little girl coming toward me. I began to wave my arms and yell. I said I was a Soviet and had come from space."

News of Gagarin's flight swept round the globe. "Man in space!" the London Evening News announced. In America, which had its own space goals, the news was less welcome.

Reporters pressed Nasa for a quote and phoned press officer John "Shorty" Powers at 4.30am. Powers, outraged at the call, snarled: "What is this! We're all asleep down here!" Next morning's US headlines included the classic: "Soviets put man in space. Spokesman says US asleep."