M. Scott Carpenter, whose flight into space in 1962 as the second American to orbit the Earth was marred by technical problems and ended with the nation waiting anxiously to see if he had survived a landing far from the target site, died on Thursday in Denver. He was 88 and one of the last two surviving astronauts of America’s original space program, Project Mercury.

His wife, Patty Carpenter, announced the death. No cause was given. Mr. Carpenter had entered hospice care recently after having a stroke.

His death leaves John H. Glenn Jr., who flew the first orbital mission on Feb. 20, 1962, and later became a United States senator from Ohio, as the last survivor of the Mercury 7.

When Lieutenant Commander Carpenter splashed down off Puerto Rico in his Aurora 7 capsule on May 24, 1962, after a harrowing mission, he had fulfilled a dream.