The Apollo 12 astronaut Richard “Dick” F Gordon Jr, one of a dozen men who flew to the moon but didn’t land, has died aged 88.

Gordon was a test pilot when he was chosen for Nasa’s third group of astronauts in 1963. He flew on Gemini 11 in 1966, walking in space twice. In 1969 Gordon circled the moon in the Apollo 12 command module Yankee Clipper while crewmates Alan Bean and Charles Conrad landed and walked on the lunar surface.

Over the two flights he spent nearly 316 hours in space.

“Dick will be fondly remembered as one of our nation’s boldest flyers, a man who added to our own nation’s capabilities by challenging his own. He will be missed,” said acting Nasa administrator Robert Lightfoot.

Gordon died on Monday at his home in San Marcos, California, according to the Astronaut Scholarship Foundation.

Born in Seattle, a navy captain and a chemist, Gordon was such a steely professional that after a difficult first spacewalk he fell asleep during a break in his second spacewalk. He downplayed Apollo 12 being hit by lightning during liftoff; backup batteries saved the crew from having to abort the mission.

“He’s a cool guy,” Bean recalled on Tuesday. “He’s the kind of guy you want when you go to the moon.”

In a 1997 Nasa oral history, Gordon said people would often ask if he felt alone while his two partners walked on the moon. “I said, ‘Hell no, if you knew those guys, you’d be happy to be alone’.”

Gordon called that experience wonderful: “You don’t have to communicate. You don’t have to worry about pleasing anyone beside yourself. And there’s a lot of things that you have to do and accomplish. And it’s a moment of solitude.”

Gordon and Bean described the second moon landing as a mission full of antics and dust.

When Conrad and Bean left the moon and docked their lunar module, Gordon said he looked in and “all I could see was a black cloud in there. I didn’t see them at all. I looked in there and said, ‘Holy smoke. You’re not getting in here and dirtying up my nice clean Command Module.’ So they passed the rocks over, took off their suits and underwear, and I said, ‘OK, you can come in now’.”

Gordon had been slated to command the Apollo 18 mission that would land on the moon but it was cut for budget reasons. Apollo 17 was the last mission to the moon. In all 24 Americans flew to the moon and 12 landed on it.

While in the navy as a test pilot, Gordon won the Bendix Trophy Race from Los Angeles to New York in 1961, setting a speed record of 869.74 miles per hour.

Gordon was the instant leader of a star-studded class of 14 astronauts that included Apollo 11’s Buzz Aldrin and Michael Collins and the last man on the moon, Eugene Cernan, Bean recalled.

“He was a happy guy and just the best possible crewmate and friend,” he said.

During his first Gemini 11 spacewalk Gordon said he and crewmate Conrad “were so jacked up” that they were ready an hour early. When it came time to put on his helmet it wouldn’t fit. After much effort and lost time he got it on, but was exhausted and behind schedule.

“I was perspiring,” he later recalled. “My eyes were stinging … they decided to quit.”

His second spacewalk was so calm that he and Conrad caught themselves falling asleep. “It was nice and warm and cuddly,” Gordon said.

After retiring from Nasa in 1972 he became executive vice-president of the New Orleans Saints football team. He went on to be an executive in energy and science companies.

Gordon is survived by six children, two stepchildren and five grandchildren.