NASA has finally fixed its Hubble Space Telescope after weeks of troubleshooting a mysterious glitch.

On Friday, the agency announced that Hubble had successfully turned on backups to the faulty hardware that shut down its operations more than a month ago. Now NASA engineers are slowly returning the telescope to full operations. The process could take a few days.

"I was quite worried," NASA Associate Administrator Thomas Zurbuchen said in a Friday video interview with Nzinga Tull, who led the Hubble team through troubleshooting. "We all knew this was riskier than [what] we normally do."

Hubble is the world's most powerful space telescope, but it's getting old. It launched into orbit in 1990. It has photographed the births and deaths of stars, spotted new moons circling Pluto, and tracked two interstellar objects zipping through our Solar System.

Its observations have allowed astronomers to calculate the age and expansion of the Universe and to peer at galaxies formed shortly after the Big Bang.

Even though NASA has probably fixed the issue, it's a sign that Hubble's age may be starting to interfere with its science. The telescope hasn't been upgraded since 2009, and some of its hardware is more than 30 years old.

"This is an older machine, and it's kind of telling us: Look, I'm getting a little bit old here, right? It's talking to us," Zurbuchen said. "Despite that, more science is ahead, and we're excited about it."

Astronauts have visited Hubble for repairs and maintenance on five occasions. (NASA)Astronauts have visited Hubble for repairs and maintenance on five occasions. (NASA)

A risky maneuver saved the world's most powerful space telescope

Hubble's payload computer – a 1980s machine that controls and monitors all of the spacecraft's science instruments – suddenly stopped working on June 13. Engineers tried and failed to bring it back online several times.

Eventually, after running more diagnostic tests, they realized that the computer wasn't the problem at all – some other hardware on the spacecraft was causing the shutdown.

It's still not totally clear which piece of hardware was the culprit. Engineers suspect that a failsafe on the telescope's Power Control Unit (PCU) instructed the payload computer to shut down. The PCU could have been sending the wrong voltage of electricity to the computer, or the failsafe itself could have been malfunctioning.

But NASA was prepared for issues like this. Each piece of Hubble's hardware has a twin pre-installed on the telescope in case it fails. So engineers just had to switch to that backup hardware.

NASA has rebooted Hubble using this type of operation in the past. In 2008, after a computer crash took the telescope offline for two weeks, engineers switched over to redundant hardware.

A year later, astronauts repaired two broken instruments while in orbit – that was Hubble's fifth and final servicing operation. (NASA no longer has a way to launch astronauts to the space telescope.)

Still, this week's hardware switch was a risky maneuver.

"You can't see the spacecraft, you can't watch it happen. You have to make sure that your command uploads are going to do exactly what you intend them to do," Paul Hertz, director of NASA's astrophysics division, told Insider last week.

"You just don't want to accidentally break anything," he added.

It didn't help that engineers couldn't just switch over the malfunctioning PCU. The unit is linked to lots of other components, so NASA had to switch over other hardware, too.

The agency also used the backup payload computer instead of the original, just to be safe. It powered up correctly, engineers loaded it with up-to-date software, and now it's in "normal operations mode", NASA said in its Friday update.

"I feel super excited and relieved," Tull said. "Glad to have good news to share."

The Pillars of Creation in the Eagle Nebula 6,500 light years away, taken by the telescope in 2015. (ESA/Hubble/Hubble Heritage Team) (ESA/Hubble/Hubble Heritage Team)

Above: The Pillars of Creation, Eagle Nebula, 6,500 light years away, taken by Hubble in 2015.

Getting Hubble back to its science will take a few days

Now the Hubble team has to start powering up the telescope's science instruments. It could take as long as a week to return to full operations, according to Hertz.

There's still a mystery to solve: Why did the telescope stop working in the first place?

Whatever the faulty hardware is, Hubble no longer has a backup for it. If it fails again, that could spell the end of Hubble.

"Whatever that component is, it's in lots of other satellites," Hertz said. "We always want to understand what works and what doesn't work in space."

This article was originally published by Business Insider.

More from Business Insider: