HOUSTON (Reuters) - Two spacewalking astronauts on Saturday tackled one of their toughest repairs to the Hubble Space Telescope -- a meticulous fix of a broken camera -- and installed a new spectrograph that can divine the properties of distant galaxies.

Astronaut Andrew Feustel, on the shuttle's robotic arm, and John Grunsfeld in Atlantis' payload bay with the Hubble Space Telescope in the background near the end of their spacewalk in this image from NASA TV May 16, 2009. REUTERS/NASA TV

Astronauts John Grunsfeld and Andrew Feustel spent 6-1/2 hours outside the shuttle Atlantis for the third of five back-to-back spacewalks to upgrade the famous space observatory for another five to 10 years of work.

NASA officials had billed Saturday’s spacewalk as the “hold your breath” day for Atlantis’ ongoing 11-day mission, the fifth and final servicing call to Hubble before the shuttle fleet is retired next year.

But Grunsfeld and Feustel’s tasks came off without a hitch, after two earlier spacewalks were beset with balky equipment that required astronauts to improvise.

Thursday’s installation of a new wide-field camera was almost derailed by a frozen bolt.

Saturday’s work required Grunsfeld to clamber into Hubble’s body, dig into its electronic guts and replace sharp-edged computer circuit boards that were never meant to be repaired in space.

Slideshow ( 6 images )

32 TINY FASTENERS

Working mostly by feel, Grunsfeld cut off a mesh grid, unscrewed a protective plate and used a specially designed pair of tongs to pluck out four circuit boards.

It was the first time that NASA had tried to fix an instrument on Hubble rather than replacing it.

“This activity is dedicated to studying the behavior of tiny screws in space,” Grunsfeld joked after removing 32 fasteners securing the faulty circuit boards in Hubble’s Advanced Camera for Surveys, which shut down in 2007 after a power failure.

Hubble’s observations have reshaped scientists’ understanding of how galaxies form and change over time, of planet origins and of the mysterious “dark energy” force that is inflating the universe at a faster and faster rate.

To keep Hubble on the cutting edge of scientific discovery, it is being outfitted with two new instruments. One is a panchromatic wide-field camera, installed on Thursday, which can see closer to the origins of the universe.

The other is the Cosmic Origins Spectrograph, installed on Saturday, which replaces a package of mirrors that was installed in the telescope in 1993 to correct for blurry vision caused by flaws to the original telescope.

The spectrograph -- the most sensitive such instrument to ever fly in space -- delivers precise astrophysical data on the temperature, density and speed of distant cosmic bodies.

“It wants to go as deep out in space, as far back in time, as fast as it can,” said senior Hubble project scientist David Leckrone.

The Cosmic Origins Spectrograph and Advanced Camera for Surveys passed initial tests. But NASA engineers were not immediately able to confirm that the instruments were functioning fully.

On Friday astronauts replaced gyroscopes that will allow Hubble to steady its gaze on distant galaxies.

Replacing Hubble’s six gyroscopes was the top priority for the mission. NASA hopes the improvements will keep Hubble operational until at least 2014 so it can work in tandem with its replacement, the James Webb Space Telescope.