US astronaut Neil Armstrong, the first man on the Moon, has died aged 82.

A statement from his family says he died from complications from heart surgery he had earlier this month.

He set foot on the Moon on 20 July 1969, famously describing the event as "one small step for a man, one giant leap for mankind".

US President Barack Obama said Armstrong was "among the greatest of American heroes - not just of his time, but of all time".

Last November he received the Congressional Gold Medal, the highest US civilian award.

Image caption Neil Armstrong, the first man to set foot on the Moon, has died aged 82. Here he is seen sitting inside the Lunar Module while it rested on the Moon's surface. Life in pictures: Neil Armstrong Your memories 'Diffident' emissary of mankind

He was the commander of the Apollo 11 spacecraft. More than 500 million TV viewers around the world watched its touchdown on the lunar surface.

Armstrong and fellow astronaut Edwin "Buzz" Aldrin spent nearly three hours walking on the moon, collecting samples, conducting experiments and taking photographs.

"The sights were simply magnificent, beyond any visual experience that I had ever been exposed to," Armstrong once said.

Media playback is unsupported on your device Media caption Buzz Aldrin: "The aerospace world will be saddened"

'Reluctant hero'

Mr Aldrin told the BBC's Newshour programme: "It's very sad indeed that we're not able to be together as a crew on the 50th anniversary of the mission… [I will remember him] as a very capable commander."

Apollo 11 was Armstrong's last space mission. In 1971, he left the US space agency Nasa to teach aerospace engineering.

Born in 1930 and raised in Ohio, Armstrong took his first flight aged six with his father and formed a lifelong passion for flying.

He flew Navy fighter jets during the Korean War in the 1950s, and joined the US space programme in 1962.

Media playback is unsupported on your device Media caption President Obama described him as "one of the greatest American heroes of all time"

Correspondents say Armstrong remained modest and never allowed himself to be caught up in the glamour of space exploration.

"I am, and ever will be, a white-socks, pocket-protector, nerdy engineer," he said in February 2000, in a rare public appearance.

In a statement, his family praised him as a "reluctant American hero" who had "served his nation proudly, as a navy fighter pilot, test pilot, and astronaut".

The statement did not say where Armstrong died.

He had surgery to relieve four blocked coronary arteries on 7 August.