Michael Griffin, a Nasa administrator, said on Tuesday the space shuttle would make one final maintenance trip, possibly in 2008, to the orbiting telescope.
Scientists, who had feared Hubble would disintegrate before the end of the decade unless it received an upgrade, applauded the decision.
The trip is to go ahead despite shuttle astronauts being unable to take shelter on the International Space Station if something went wrong, Griffin said at the Goddard Space Flight Center near Washington.
Sean O'Keefe, a former Nasa administrator, cancelled a Hubble repair mission after the Columbia shuttle disaster that killed seven astronauts in 2003.
O'Keefe believed the risks were too great and the remaining shuttle missions should focus on completing construction of the international space station.
Griffin, however, said that he was convinced the repair mission could be done after the last three shuttle flights demonstrated astronauts' ability to inspect the spacecraft in-flight and make difficult repairs.
"The safety of our crew conducting this mission will be as much as we can possibly do."
"We're not going to risk a crew in order to do a Hubble mission."
Hubble is considered by some scientists to be the most important astronomical instrument ever.
It has captured some of the most spectacular images of the universe, popularising astronomy and advancing the understanding of space.