WASHINGTON — John Grunsfeld, NASA’s associate administrator for science and a self-described “Hubble hugger” who flew on several missions to repair the Hubble Space Telescope, will retire from the agency at the end of April, NASA announced April 5.

Grunsfeld, who has led NASA’s Science Mission Directorate since January 2012, will retire on April 30. Geoff Yoder, the current deputy associate administrator for science, will take over in an acting capacity until the agency picks a permanent replacement.

“John leaves an extraordinary legacy of success that will forever remain a part of our nation’s historic science and exploration achievements,” NASA Administrator Charles Bolden, also a former astronaut, said in a statement. “It was an honor to serve with him in the astronaut corps and watch him lead NASA’s science portfolio during a time of remarkable discovery.”

Grunsfeld joined the astronaut corps in 1992 after earning a doctorate in physics from the University of Chicago and doing research in x-ray and gamma-ray astronomy. He flew on five shuttle missions, the last three of which were servicing missions to Hubble in 1999, 2002 and 2009. While a NASA astronaut, he was detailed to NASA Headquarters to serve as the agency’s chief scientist in 2003 and 2004, supporting development of the Vision for Space Exploration.

He left the astronaut corps, and the agency, in late 2009 to become deputy director of the Space Telescope Science Institute in Baltimore, the center that handles science operations of Hubble. He returned to NASA about two years later to lead the science mission directorate, succeeding the retiring Ed Weiler.

Grunsfeld’s astronomy background and his experience repairing Hubble earned him the nickname of “Hubble hugger,” a moniker that he embraced as he rarely missed an opportunity to publicize the spacecraft. “Of course, I have to start with a picture of the Hubble Space Telescope,” he said at the beginning of a general talk about NASA’s science programs at the Goddard Memorial Symposium outside Washington in March.

Grunsfeld took over NASA’s science portfolio shortly after the agency went through a “replan” of the James Webb Space Telescope because of cost overruns and delays. Since then, that project has remained on track, and most other science missions have also stayed close to their budgets and schedules. That has kept NASA’s science programs largely free of congressional criticism during his tenure.

“We’re incredibly lucky that we have a Congress — both houses, both parties — that supported us with an appropriation of nearly $5.6 billion in fiscal year 2016,” he said at the Goddard event. “We are doing an incredible amount of science.”

In the NASA statement, he said he was leaving the agency with its science program “well-positioned” for the future. “I’m grateful to have had this extraordinary opportunity to lead NASA science,” he said.

“After exploring strange new worlds and seeking out new life in the universe, I can now boldly go where I’ve rarely gone before: home,” he added.

Jeff Foust writes about space policy, commercial space, and related topics for SpaceNews. He earned a Ph.D. in planetary sciences from the Massachusetts Institute of Technology and a bachelor’s degree with honors in geophysics and planetary science...