WASHINGTON : US flags worldwide were ordered flown at half-staff on Thursday as astronaut John Glenn, the first American to orbit Earth, was laid to rest with military honors.

Glenn died in December 2016 at the age of 95, after a long career that included serving as a Marine fighter pilot, a NASA astronaut and a US senator.

His five-hour solo orbit around Earth in 1962 established Glenn as an American pioneer. A year earlier, Russian cosmonaut Yuri Gagarin had become the first human in space and orbited the planet.

In 1998, Glenn made history again when he returned to space at the age of 77, becoming the oldest astronaut in space. Glenn's casket, draped in a US flag covered in plastic to protect it from pouring rain, was pulled on a horse-drawn carriage through Arlington National Cemetery just outside Washington.

More than 400,000 service members, veterans and their families are buried at the nation's premier military cemetery in Virginia overlooking the US capital.

US president John F. Kennedy and Robert Kennedy, his brother and Democratic presidential candidate -- both of them assassinated -- are among the most famous people buried there.

A Marine Corps honor guard folded the flag and presented it to his 97-year-old widow Annie.

Glenn was laid to rest on what would have been their 74th wedding anniversary.

President Donald Trump ordered all flags at government buildings in the United States and abroad to be flown at half-staff from sunrise to sundown "as a mark of respect for the memory of John Glenn."

A number of astronauts, including those who perished in the space shuttle Columbia and Challenger disasters, are buried at the cemetery.

Glenn's grave is not far from those of his astronaut colleagues Virgil "Gus" Grissom and Roger Chaffee, who were killed in a fire aboard the Apollo 1 capsule in 1967.

"Senator Glenn was more than an astronaut -- he was the hero we needed in a rapidly changing world and an icon of our American spirit," said NASA administrator Robert Lightfoot in a statement.

"We will never forget him."