Credit: NASA

When the Hubble Space Telescope blasted into space on 24 April 1990, it promised astronomers an unprecedented view of the Universe, free from the blurring effects of Earth's atmosphere.

But Hubble's quarter-century in orbit has never gone according to plan. The telescope — a joint venture between NASA and the European Space Agency (ESA) — faced a crippling flaw after launch that required astronauts to fly up and fix it. Later, problems with Hubble and NASA's shuttle programme left the telescope's future in jeopardy.

Through it all, Hubble emerged as the world's foremost astronomical observatory. Conceived by astronomer Lyman Spitzer in the 1940s, the telescope has led to fundamental discoveries, revealing for instance that the furthest reaches of the Universe are full of galaxies and that dark energy is pushing the cosmos apart at an ever faster rate. Its stunning images have transformed scientific understanding of the Universe and become wildly popular.

Here, Nature tells the story of Hubble through the words of some of its key players, beginning in 1972. At that time, the space telescope was little more than a set of engineering drawings.

Hubble's top 10: project scientists pick their favourite images from the telescope

Robert O'Dell, former Hubble project scientist: I was told it would not take very long to build it. But I went in with my eyes wide open.

I could see that building Hubble was going to be the future. It was a chance to lead and influence the development of what I thought, even then, would be the most important telescope of my generation.

Jean Olivier, former Hubble chief engineer: Hubble was a proving ground for many technologies. Things you would think would be low-tech, like designing latches, evolved into a major problem. We kept uncovering more and more challenges.

It got to be such a long programme that I began to think it's not real life, it's a game — and one day they're going to say: “We're just kidding, we wanted to see how much you could take.”

O'Dell: The lowest period was when it was becoming clear that we couldn't afford to do everything that we wanted to. This was right in the early hardware phase. I proposed that we would initially launch Hubble without all the instruments that were being developed. I proposed that out of desperation because people were actually saying we were going to cancel the programme unless you significantly reduce the costs. The lowest day for me was being chewed out in NASA headquarters for not standing up for the science of the project.

Hubble finally soared into orbit in 1990 aboard the space shuttle Discovery . But when the first image came back, it was blurry owing to a flaw known as spherical aberration.

Sandra Faber, astronomer, University of California, Santa Cruz: The picture was taken with our camera [the Wide Field and Planetary Camera], and it looked weird. It was a star, but it had a bright point at the centre. One of the astronomers on our team looked at the image and said, “This telescope has spherical aberration.” That immediate diagnosis was extremely severe, with huge consequences.

Olivier: The months immediately after launch were just a nightmare.

Faber: Our team wanted to know whether that was really true. We moved the secondary mirror in and out of focus in order to sample the spherical aberration at different levels. In June, at a project meeting, we showed our results and there could be no doubt. It was a catastrophe.

Olivier: I got a phone call to come into NASA headquarters. We explained what the problem was. The deputy administrator, J. R. Thompson, kept telling me, “Olivier, you've got to turn another knob on the spacecraft to fix this!” I said, “J. R., I don't have a knob to turn.” It took a few days for the top men to realize, deep down in their hearts, that they had a real problem.

We put a telescope in space and it could hardly see. I felt terrible. I felt like a dog wouldn't take a bone from me.

Workers inspect Hubble's 2.4-metre main mirror in 1984. Credit: NASA/Corbis

The problem turned out to originate from a spacing error in the device used to shape the primary mirror. The error had been made by the mirror contractor, Perkin-Elmer Corporation, and had been missed repeatedly by NASA. It affected all five of Hubble's initial instruments, and could not be fixed from the ground.

Edward Weiler, former Hubble chief scientist: I had the unique honour of being the one to explain what the impacts on the scientific programme of Hubble would be. That was the day of infamy.

But luckily, about two hours before the press conference, [Hubble imaging expert] John Trauger pulled me aside and said: “Ed, I think we've got something you should know about. We think we can fix this. We have these four relay mirrors that are flat, but if we put a small curve on them, a curve that is the opposite of the bad curve on the mirror, it will cancel out.”

I reported this to the press conference. I promised we had this fix in hand, and of course nobody believed anything we said. It was not a friendly situation. I had neighbours come up to me and say how much sympathy they had for me working on a national disaster.

Nature special: Hubble's 25th anniversary

Faber: Our big fear that was Hubble would not be fixed. How would we keep the public's and NASA's interest alive in Hubble while a repair plan could be invented?

It took three years to make that plan. NASA engineers had to develop ways to fix each instrument, with all the work done by astronauts in bulky spacesuits working in zero gravity. In December 1993, seven astronauts launched aboard the space shuttle Endeavour to save Hubble.

Weiler: If you had asked me for the odds ahead of time, I'd have said 50% success. This was the first time we ever tried to repair a satellite. Five [spacewalks] all had to go perfectly. But things kept going right. It was like a dream sequence. You were afraid you were going to wake up and there was going to be a problem.

We went home at the end of the mission like a surgeon goes home after an eye operation: they've done everything they can, but until the bandages come off you won't know for sure.

Antonella Nota, ESA Hubble Project scientist, Space Telescope Science Institute (STScI), Baltimore, Maryland: When we saw the first images, it was like history had erased those three years of pain.

Weiler: We were all huddled around a little screen, waiting for the first image to come down. It probably only took five seconds but it seemed like six hours.

First we saw a little dot in the centre, but it was a really well-focused dot. And then we saw the faint stars. You just knew, right then, that we had nailed it. That night, I slept like a baby. The trouble with Hubble was over.

John Grunsfeld refurbishes Hubble in 2009. Credit: NASA

With its corrected vision, the telescope could start doing the science astronomers had always hoped for — including responding to fast-moving celestial events, such as the death of comet Shoemaker–Levy 9, which plunged into Jupiter just months after the repair mission. But that first big test for Hubble was almost a failure.

David Leckrone, former senior project scientist: That was the most exciting week I had on Hubble. Many people don't realize that less than two weeks before the first impact, Hubble went into safe mode. Two days before a critical observation, a software engineer at Goddard [Space Flight Center] figured it out and fixed it. It was a brilliant success, to watch a comet tear apart into fragments and crash into the planet a few months after Hubble had been repaired. Imagine if that had happened in 1993 instead of 1994.

Zoltan Levay, image scientist, STScI: The first test. That was a huge deal.

Weiler: It's a classic great American comeback story.

One after another, Hubble's discoveries began landing on the front pages of newspapers and in top scientific journals.

Weiler: Hubble has been the greatest scientific success in NASA's history. With just one picture it could show how the Universe didn't read our textbooks.

Nota: Hubble can look in wavelength regimes that are not accessible from the ground, like ultraviolet, because ultraviolet radiation gets absorbed by the atmosphere.

Jennifer Wiseman, senior project scientist, Goddard Space Flight Center, Greenbelt, Maryland: There was a burst of new science from Hubble right after 1993. One of these iconic images is the Eagle Nebula, where you see columns of gas where stars have recently formed and are still forming. The informal name is the 'Pillars of Creation', a grandiose title. This gave us a visual clue as to the interaction of young stars.

Leckrone: Bob O'Dell got pictures of the Orion Nebula. They showed these funny little cocoons all over the place. As you looked more closely, you saw examples of stars surrounded by dark disks. My god, these are places where planets must be forming!

O'Dell: It was the only truly eureka moment I've had as a scientist.

Wiseman: Hubble homed in on the core of the galaxy M87 to monitor the motion of gas there. The astronomers used a spectrograph to find the gas was moving about a million miles per hour in one direction on one side of the core, and a million miles per hour in the other direction on the opposite side. The only way something could be orbiting this fast would be if there were something very massive in the core in a very small volume. This was the first definitive observation of a supermassive black hole in the core of another galaxy.

Leckrone: Hubble continues to defy all expectations in creative new ways in which it can be used. Look at dark energy.

Kenneth Sembach, head of the Hubble Mission office, STScI: We know dark energy pervades the Universe because we've been able to measure the expansion rate of the Universe at different times. The key to doing that has been looking at distant supernovae [with Hubble]. The more distant supernovae are dimmer than you would have expected. The teams that won the Nobel Prize in Physics in 2011 realized that the Universe was expanding at an accelerating rate.

The impacts on Jupiter of comet Shoemaker–Levy 9. Credit: H. Hammel (MIT)/NASA/ESA

This is the equivalent of throwing a ball up in the air and it just decides to speed up and keep going up. That would be a repulsive force rather than an attractive force. It works against gravity.

Wiseman: The repaired Hubble had exquisite angular resolution that allowed us to look for individual stars, to separate them in crowded regions. In this way you could actually study populations of stars and map out their properties.

The public responded to the flood of gorgeous imagery. Hubble became NASA's first Internet sensation.

Leckrone: We've developed a following of people who are not astronomers but have learned to love astronomy.

Levay: I'm honoured that people admire these results. It has just kind of snowballed. People have done songs and stuff inspired by Hubble. There's poetry, artwork.

We've been batting around ideas of why Hubble is so much in the public consciousness. One is because we came along right when the Internet was really starting to take off. A lot of people had easy instant access to the results from Hubble.

Nota: We call it the people's telescope. We have really brought the Universe to people's homes. Some 15 years ago I was in this remote area of Papua New Guinea, living on a ship that would dock in places where there wasn't even a harbour. One time, we couldn't believe it, there was a kid wearing a Hubble T-shirt. The child was delighted when we gave him a set of Hubble cards to play with, to go with his T-shirt.

Weiler: After I retired and moved to Florida, I negotiated with my wife. Half the pictures in the house are Hubble, and half are other things.

Astronauts continued to visit the telescope, upgrading and replacing its instruments regularly to extend its life. Sometimes, Hubble's future looked dim. In 1999, astronauts launched an emergency repair mission after three of the telescope's six gyroscopes failed.

We call it the people's telescope. We have really brought the universe to people's homes.

John Grunsfeld, NASA astronomer and astronaut who has performed eight spacewalks to service Hubble: Hubble had gone dark, and it was a real question as to whether the science was over. For an astronomer and an astronaut, this was a holy grail of repair missions. Up we went, and soon enough we saw this bright star on the horizon. It was Hubble.

It was surreal. There was one moment when I was out at the end of the robotic arm, and the operator drove me towards Hubble, slowly turning me over. I put out my index finger and just kind of tapped the telescope, to prove to myself it was all real.

We deployed it on Christmas Day. I remember thinking, what better present could there be for planet Earth than a repaired Hubble?

Four years later, in the wake of the Columbia shuttle disaster, NASA administrator Sean O'Keefe cancelled a final planned servicing mission, citing safety concerns.

Matt Mountain, former director, STScI: What made it worse was the instruments started failing. It was actually pretty bleak. It was clear Hubble was not doing as well as it should be.

Weiler: Luckily administrators changed, and we got Mike Griffin in there. He supported looking at the alternatives, and at the end of the day we got our servicing mission.

Mountain: Griffin announced he would allocate two shuttles to this. That's an incredible commitment by a space agency to a science mission. Suddenly the attitude changed, and there was a future for the whole team at Hubble.

Grunsfeld: When we saw it on approach [on the final servicing mission, in 2009], it was as if we were seeing an old friend. Very few people have hugged Hubble the way I have. I knew all the handrails practically by name. When we let it go, it was in the best shape of its life. We had accomplished our job, and its science heritage would continue.

A pillar of gas and dust in the Eagle Nebula. Credit: Hubble Heritage Team (STScI/AURA)/ESA/NASA

The telescope remains a premier tool, particularly for time-consuming, data-rich surveys that are meant to benefit the astronomical community for years to come. Hubble set the standard for uploading data to a communal archive available to all astronomers.

Jennifer Lotz, astronomer, STScI: I feel incredibly lucky to have started my career in the golden age of astronomy and the golden age of Hubble. The idea of saving all the data and making it available to people after a certain amount of time, that was pretty radical. Now it is accepted practice. You don't have to be the student of the most famous professor in the world to have access to the best data in the world.

Jason Kalirai, astronomer, STScI: People have the misconception that its best days are behind it. More than two research papers every day come out of Hubble. What it's doing today is different from what it's done in the past.

Nota: Look at one example of a topic that didn't even exist when Hubble was launched: exoplanets. When Hubble launched we didn't even know about the existence of planets outside our Solar System. In 25 years that field has completely revolutionized. Hubble was not designed to study exoplanets but now is characterizing their atmospheres. Hubble always surprises us.

NASA is currently testing Hubble's successor, the James Webb Space Telescope, which is scheduled to launch in 2018. But researchers are still planning for Hubble's final years.

Wiseman: Hubble right now is as scientifically powerful as ever, perhaps more scientifically powerful than ever.

Sembach: In the time we have left, we want to push the envelope. We want to do different things that we haven't done before. We've put out a call to the community asking for creative ideas. Should we be devoting more time to specific types of observations? Should we be devoted to helping students do research with the observatory?

We expect to operate through at least 2020. Right now things look pretty good. That gives us a chance to overlap for a year or two with the James Webb Space Telescope.

Paul Hertz, director, astrophysics division, NASA: We will operate Hubble as long as it stays scientifically productive. My guess is that something's going to break someday.

Leckrone: It will be a gradual, graceful failure. With creative engineering you can keep doing good science. As long as we have at least two good instruments, I think we can keep going even when the spacecraft itself has suffered multiple failures. That might take us to 2025. But it's not going to be with us forever, and we're really going to miss it when it's gone.