CAPE CANAVERAL, Fla. — Apollo 15 astronaut Al Worden, who circled the moon alone in 1971 while his two crewmates test-drove the first lunar rover, died Wednesday at age 88.

Worden died in his sleep at a rehab center in Houston following treatment for an infection, said friend and colleague Tom Kallman.

“Al was an American hero whose achievements in space and on Earth will never be forgotten,” said NASA Administrator Jim Bridenstine in a statement. He also praised Worden for his appearances on “Mister Rogers’ Neighborhood” to explain his moon mission to children.

Worden flew to the moon in 1971 along with David Scott and Jim Irwin. As command module pilot, Worden remained in lunar orbit aboard the Endeavour while Scott and Irwin descended to the surface and tried out NASA’s first moon buggy.

Scott is one of four moonwalkers still alive. Irwin died in 1991.

″‘Line of Grey, Be Thou at Peace!’ Godspeed Al,” tweeted Apollo 11 moonwalker Buzz Aldrin, borrowing from their West Point alma mater.

Once his moonwalking crewmates were back on board and headed home, Worden performed the first deep-space spacewalk — nearly 200,000 miles from Earth. He inspected the service module’s science instrument bay and retrieved film. His foray outside lasted just 38 minutes.

Worden said of the mission: “Now I know why I’m here. Not for a closer look at the Moon, but to look back at our home, the Earth.”

Apollo 15 was Worden’s only spaceflight. He was in NASA’s fifth astronaut class, chosen in 1966. He retired from NASA in 1975 and went to work for a few aerospace companies.

Of the 24 men who flew to the moon from 1968 through 1972, only 11 are still alive.

Born and raised on a farm in Jackson, Michigan, Worden graduated from the US Military Academy at West Point, New York, in 1955 and was commissioned in the Air Force. He attended test pilot school.

“As I was growing up, aviation was not really something that was foremost in my mind,” Worden said in a 2000 oral history for NASA. “From the age of 12 on, I basically ran the farm, did all the field work, milked the cows, did all that until I left for college.”

While in the Air Force, “I began to realize that flying was kind of my game. It was a thing that I was very attuned to.”

Going to the moon was “like flying an airplane,” Worden said in the NASA oral history. “It’s a skill that you learn. It takes some knowledge. It takes some analytical ability if something goes wrong, but outside of that it’s like driving a car.”

Working as a senior aerospace scientist at NASA’s Ames Research Center in Mountain View, California, after the flight was more intellectually stimulating, he noted.

In his 2011 book “Falling to Earth: An Apollo 15 Astronaut’s Journey to the Moon,” Worden wrote that NASA was leery about young children watching a rocket launch and so he called Fred Rogers in Pittsburgh. Worden, the father of three daughters, ended up doing a special show.

”It was so outside of what most astronauts did, many thought I was crazy. Astronauts liked to think they were super jocks who hunted, fished, drank and chased girls. We didn’t do kiddies’ shows.”

A list of children’s questions eventually led to Worden’s 1974 book for children “I Want to Know about a Flight to the Moon.”

After returning from the moon, all three Apollo 15 astronauts became embroiled in a controversy over a few hundred stamped postal covers that flew with them to the moon. The astronauts planned to sell them to help pay for their children’s education, Worden said in the NASA oral history.

Worden said he assumed the stamped covers were on the official flight manifest but wasn’t sure now that they ever were. All this resulted in “quite a flap.”

None of the three ever flew in space again. He blamed NASA management.

“Some senator or some congressman asked the question and they caved under right away and tried to get rid of us,” he said in the oral history. “Nobody stood up for us. Nobody.”

Worden sued the US government in 1983 and got his covers back.

“We probably didn’t do the smartest thing in the world, but we didn’t do anything that was illegal,” he said. “We didn’t do anything that anybody else hadn’t done, but the consequences were rather severe to us.”

Worden most recently worked with Kallman, a New Jersey businessman, on promoting science, engineering and math education, as well as providing scholarships for international young people to attend Space Camp in Huntsville, Alabama.

“That foundation lives on and he lives on through it as well,” Kallman said.