WASHINGTON — NASA says legendary astronaut John Young, who walked on the moon and later commanded the first space shuttle flight, has died. Young was 87.

The space agency said Young died Friday night following complications from pneumonia.

NASA said Young was the only agency astronaut to go into space as part of the Gemini, Apollo and space shuttle programs, and the first to fly into space six times. He was the ninth man to walk on the moon.

He died at home in Houston.