Moving delicately high above the Earth, astronauts worked to fix the planet's best window to the universe on Sunday, repairing the Hubble Space Telescope for another decade of service.

Sometimes, the repairs required less-than-delicate solutions.

Atlantis astronaut Michael Massimino had trouble removing a bolt that was in the way of a scientific instrument. So he did what an amateur repairman would do: He used brute force to bend it out of the way.

He had a bit of help from engineers at Goddard Space Flight Center in Maryland, who ran tests and found Massimino would need to apply 60 pounds of pressure on the bolt.

As he worked away at the piece of metal, Mission Control warned him and fellow astronaut Michael Good -- also on a spacewalk -- to be alert for flying debris.

"This is like tying branches together in Boy Scouts," Good said.

The whole procedure took about two hours. Once the bolt was out of the way, the astronauts went to work on fixing Hubble's Space Telescope Imaging Spectrograph, which stopped working five years ago after two electronics failures.

The spectrograph helps scientists locate black holes and examine the atmosphere of planets, by providing spectra and images at ultraviolet and visible wavelengths.

Later, as Massimino attempted to install a plate used to capture the screws, his power tool ran out of energy. It took longer than an hour for him to get back to the shuttle to swap the batteries and top up his air supply.

The hiccups meant that some other things on the to-do list -- like installing insulation -- had to be postponed until Monday.

On Tuesday, the crew will part ways with Hubble, where it will snap photos until the end of its service.

Hubble has been capturing images of the universe for nearly two decades, and NASA hopes the latest repairs will keep the observatory functioning for another 10 years.

At that point, the telescope will be guided back to earth for a crash landing into the ocean.

The shuttle's Canadian-made robotic arm played a key role. It was used to grab hold of Hubble and bring it closer to the shuttle's system bay last week, to allow for easier access by the astronauts.

On Saturday, another two astronauts managed to repair Hubble's survey camera. Earlier Sunday, Mission Control confirmed that two of the camera's channels were now operational, including the crucial wide-field channel. However, a third channel still did not work.

Atlantis astronauts have now embarked on four separate spacewalks. They still have one more before their return to Earth.

The entire mission is costing NASA more than US$1 billion -- 10 per cent of what the agency has spent on the observatory since it first began orbiting the planet.

"This has been arguably the most challenging of all the space walks," said York University astronomer Paul Delaney, noting the astronauts had to ensure they didn't lose any of the telescope's 117 tiny screws.

"This was not an instrument that was designed to be serviced in orbit, so they had to be very, very cunning," he told Â鶹´«Ã½net.

However, Delaney said that fixing the spectrograph will greatly improve NASA's analysis capabilities and provide scientists with the "flipside" of Hubble's beautiful images.

With files from The Associated Press