The astronaut Alan Bean, who in 1969 became the fourth person to walk on the moon, has died. He was 86. A statement released by Nasa and family members said he died on Saturday in Houston, after a short illness.

Bean was the lunar module pilot on Apollo 12, which made the second moon landing. He then commanded the second crewed flight to the first US space station, Skylab, in 1973. On that mission, he orbited the Earth for 59 days and traveled 24.4 million miles, a world record at the time.

Bean spent a total of 69 days in space, including 31 hours on the moon. Only 12 people have ever set foot on the lunar surface. Bean left his footprints on a region called the Ocean of Storms four months after Neil Armstrong became the first man to walk on the moon, in the historic Apollo 11 mission of July 1969.

On Apollo 12, Bean and Pete Conrad explored the moon’s surface and conducted experiments while Richard Gordon orbited in the command module, scouting landing sites for future missions.

“I remember once looking back at Earth and starting to think, ‘Gee, that’s beautiful,’” Bean told People magazine in 1981. “Then I said to myself, ‘Quit screwing off and go collect rocks.’ We figured reflection wasn’t productive.”

The mission was a success, though it started with a jolt. Shortly after liftoff, the rocket was struck by lightning. The crew was able to continue the three-day flight to the moon.

Alan Bean holds a container filled with lunar soil in a picture taken by Pete Conrad. Photograph: Nasa/Rex/Shutterstock

In a 1998 Nasa oral history, Bean recalled his excitement at preparing to fly to the moon. “When you’re getting ready to go to the moon,” he said, “every day’s like Christmas and your birthday rolled into one. I mean, can you think of anything better?”

Born on 15 March 1932, in Wheeler, Texas, Bean received a degree in aeronautical engineering from the University of Texas in 1955. He attended navy test pilot school and was one of 14 trainees selected by Nasa for its third group of astronauts in October 1963.

“I’d always wanted to be a pilot, ever since I could remember,” he said in the 1998 Nasa history. “I think a lot of it just had to do with it looked exciting. It looked like brave people did that. I wanted to be brave, even though I wasn’t brave at the time. I thought maybe I could learn to be, so that appealed to me.”

Bean also played a key role in preparing future astronauts, serving until the first flight of the space shuttle in 1981. He even worked with Star Trek actor Nichelle Nichols on outreach efforts.

Pete Conrad, Richard Gordon and Bean, seen at their mission simulator at the Kennedy Space Center in 1969. Photograph: HO/AFP/Getty Images

In 2009, to mark the 40th anniversary of the Apollo 11 landing, Bean exhibited his paintings of lunar scenes at the Smithsonian’s National Air and Space Museum in Washington. His paintings feature canvases textured with lunar boot prints and embedded with small pieces of his mission patches, stained with moon dust.

“Alan Bean was the most extraordinary person I ever met,” said Mike Massimino, who flew on two space shuttle missions to service the Hubble Space Telescope, in a statement. “He was a one-of-a-kind combination of technical achievement as an astronaut and artistic achievement as a painter.”

Nasa administrator Jim Bridenstine said: “Alan Bean once said, ‘I have the nicest life in the world.’ It’s a comforting sentiment to recall as we mourn his passing.” He added: “As all great explorers are, Alan was a boundary pusher. We will remember him fondly as the great explorer who reached out to embrace the universe.”

Bean’s wife of 40 years, Leslie Bean, said he died peacefully surrounded by those who loved him. He fell ill two weeks ago, while traveling in Fort Wayne, Indiana.

“Alan was the strongest and kindest man I ever knew,” said Leslie Bean. “He was the love of my life and I miss him dearly.”

He is survived by his wife, a sister and two children.

