Neil Armstrong, who made the “giant leap for mankind” as the first human to set foot on the moon, died on Saturday. He was 82.

His family said in a statement that the cause was “complications resulting from cardiovascular procedures.” He had undergone heart bypass surgery this month in Cincinnati, near where he lived. His recovery had been going well, according to those who spoke with him after the surgery, and his death came as a surprise to many close to him, including his fellow Apollo astronauts. The family did not say where he died.

A quiet, private man, at heart an engineer and crack test pilot, Mr. Armstrong made history on July 20, 1969, as the commander of the Apollo 11 spacecraft on the mission that culminated the Soviet-American space race in the 1960s. President John F. Kennedy had committed the nation “to achieving the goal, before the decade is out, of landing a man on the Moon and returning him safely to Earth.” It was done with more than five months to spare.

On that day, Mr. Armstrong and his co-pilot, Col. Edwin E. Aldrin Jr., known as Buzz, steered their lunar landing craft, Eagle, to a level, rock-strewn plain near the southwestern shore of the Sea of Tranquillity. It was touch and go the last minute or two, with computer alarms sounding and fuel running low. But they made it.