John Glenn, whose life took him to the celestial heights as the first American to orbit the Earth, then into the trenches of congressional infighting as a longtime Democratic senator, before he re-entered space as a 77-year-old, has died. He was 95.

It was announced Wednesday that Glenn was in hospital in his native Ohio with an undisclosed condition. Two years ago, he suffered a stroke after undergoing a heart valve replacement.

Glenn was the last living member of the pioneering Mercury Seven, the first astronauts selected in 1959 by the National Aeronautics and Space Administration (NASA). The class included Alan Shepard and Gus Grissom, whose sub-orbital flights into space set the stage for Glenn's historic feat three years later.

On Feb. 20, 1962, Glenn, then 40, embarked on a mission in which death was a distinct possibility. When the Mercury-Atlas Friendship 7 spacecraft blasted off, backup pilot Scott Carpenter uttered the first immortal words associated with NASA's space program: "Godspeed, John Glenn."

Glenn-Friendship

U.S. astronaut John Glenn enters the Mercury Friendship 7 capsule in Cape Canaveral, Fla., on Feb. 20, 1962, prior to the launch of the spacecraft for the first manned orbital flight by an American. (NASA/AFP/Getty Images)

Glenn had been a pilot half his life and had set a supersonic speed record for a cross-country flight five years earlier, but he was still humbled by what he surveyed.

"Oh, that view is tremendous!" 

In a shade under five hours, he circled the Earth three times, assaying deserts, mountainous terrain, sunsets, city lights and "the whole state of Florida just laid out like on a map." Residents of the city of Perth, Australia, famously turned on their lights for Glenn to appreciate.

His re-entry to earth was perilous, as it was believed one of the rocket's heat shields had come loose.

Glenn and his wife Annie were feted in New York in a ticker-tape parade and in celebrations in Ohio, where buildings, schools and roadways would be named in his honour.

Addressing members of the U.S. Congress in Washington, D.C., Glenn thanked the "thousands" who contributed to the space program effort and said, "As our knowledge of this universe in which we live increases, may God grant us the wisdom and guidance to use it wisely."

'I put on my pants the same way'

A fawning documentary was quickly produced, The John Glenn Story. In the film, his hometown mayor beamed about the "freckle-faced red-headed lad" whose "youth and life today are an example for all Americans to follow." Glenn's first flight instructor, meanwhile, shared notes from an early session with his most famous pupil — "eager to learn, relaxed, alert and good co-ordination."

Glenn encountered adversity not too long after his rapturous welcome home, however. He lost most of his life savings, having been forced to abandon a Senate campaign in 1964 after a fall led to a serious inner ear injury.

He would recover and spend the decade as a Royal Crown cola executive and a NASA consultant.

John and Annie Glenn

Glenn, and his wife Annie ride in the back of an open car with vice-president Lyndon Johnson during a parade in Glenn's honour in Washington, D.C., on Feb. 26, 1962. (The Associated Press)

"When you do something that catches the public's attention, people tend to put you up on a pedestal, as if you were completely different from them," he told The Associated Press in 1968. "But I put on my pants the same way, and eat the same food as anybody else."

Glenn lost a 1970 Senate bid, but four years later defeated Cleveland's mayor to represent the state of Ohio. He would go on to be re-elected three times, retiring from the chamber in 1999.

Glenn interviewed as a potential running mate for Jimmy Carter in 1976, but was passed over for Walter Mondale.

Democratic presidential run

Glenn launched his own presidential bid in 1984 but never gained traction on Mondale in the polls. Despite his wide public appeal, Glenn was not seen as the most gregarious campaigner, and his rivals portrayed him as a "closet Republican," given his commitment to military spending and support for some aspects of president Ronald Reagan's economic program.

Obit John Glenn

In this Tuesday, Jan. 18, 1984 file photo, Sen. John Glenn, D-Ohio, answers questions from the press in Jackson, Miss. At left is his wife, Annie Glenn. Glenn travelled through the U.S. seeking support for his presidential campaign, which ended two months later. (Tannen Maury/The Associated Press)

Glenn finished second in the Alabama primary and third in New Hampshire, pulling out of the race days after a disappointing Super Tuesday in March.

Glenn's campaign received over $30,000 US in contributions from banking executive Charles Keating, which would come back to haunt him. Glenn became embroiled as one of the so-called Keating Five senators who were accused of improperly intervening on behalf of Lincoln Savings and Loan executive Keating during a federal investigation.

Along with John McCain, Glenn would eventually be cleared by a Senate committee of the most serious charges but he was criticized for "poor judgment." 

'Childlike enthusiasm' for space return

Glenn had teenage grandsons when he became the world's oldest person in space in late 1998, on a Discovery mission with astronauts Curt Brown and Steve Lindsey.

When he announced his intention to his family at a gathering two years earlier, his daughter Lyn and son David both said publicly they were floored by the idea.

Discovery SPACE SHUTTLE

The crew of seven astronauts for the Discovery mission in 1998 is shown in the official NASA photo. Back row from left are: Scott Parazynski, Steve Robinson, Pedro Duque of Spain, and John Glenn. Front row from left are Steve Lindsey, Chiaki Mukai of Japan and mission commander Curt Brown. (NASA/Reuters)

"I was angry," Dr. David Glenn admitted to the San Francisco Chronicle. "I didn't want to have to worry. I didn't want my mom to worry."

Glenn's "childlike enthusiasm" at the prospect of returning to space, his son said, eventually won the family over.

Glenn's selection for the STS-95 mission was not unanimously hailed. He had lobbied NASA for years to return, but some saw the stated goal of research on aging in space as specious, with his presence predictably giving the program a huge boost in favourable press coverage 12 years removed from the Challenger disaster.

But from his professional colleagues, there was awe and respect.

"You can tell when you watch him operate he's an astronaut," said James Wetherbee, director of flight crew operations.

In a Q and A session conducted with schoolchildren while in space, Glenn said he had no regrets making the return trip.

"It's an advantage up here for older folks because in zero-G you can move around much more easily," he said. "I've been bumping my head a lot on things as I float around here, but that's all right."

After he returned from space, his wife Annie was again by his side as they rode in a parade in Houston. His high school sweetheart, she had become an inspiration to many herself, overcoming a severe stutter with intensive therapy at the age of 53.

Fighter pilot missions in WWII

Glenn was born on July 18, 1921, in New Concord, Ohio. A star football player in high school, he enlisted in the Navy while in college and trained as a pilot. He would transfer to the Marines and conduct dozens of missions in the South Pacific during the Second World War, seeing active duty again during the Korean War.

After he orbited the earth in 1962, president John F. Kennedy personally presented him with the NASA distinguished service medal.

Glenn's achievement gave the White House and the space program thrust, as it had become another front in Cold War politics.

Soviet cosmonaut Yuri Gagarin had became the first man in space, and a year after the near-disastrous missile standoff in Cuba with the Russians, Kennedy laid out a vision for the future in a famous Sept. 12, 1962, speech, admitting the Americans were behind in manned flight but that reaching the moon was achievable before the decade ended.

OBAMA/GLENN

U.S. President Barack Obama awards a 2012 Presidential Medal of Freedom to astronaut and former U.S. senator John Glenn during a ceremony in the East Room of the White House in Washington. (Jason Reed/Reuters)

Kennedy would not live to see his dream realized, with Neil Armstrong and Buzz Aldrin stepping out of the Eagle lunar module and onto the moon's surface in 1969.

Recent years saw Glenn paying tribute to fallen colleagues. Armstrong died in 2012, and the following year his fellow Mercury 7 astronaut died at 88, with Glenn issuing the statement: "Godspeed, Scott Carpenter — Great friend. You are missed."

Glenn, portrayed by Ed Harris in the Oscar-nominated film The Right Stuff, about the early years of NASA, was awarded the Presidential Medal of Freedom in 2012.

Survivors included his wife of 73 years.

Praised for inspiration

Reactions to Glenn's death spoke about how he inspired many people.

"When John Glenn blasted off from Cape Canaveral atop an Atlas rocket in 1962, he lifted the hopes of a nation. And when his Friendship 7 spacecraft splashed down a few hours later, the first American to orbit the Earth reminded us that with courage and a spirit of discovery there's no limit to the heights we can reach together," U.S. President Barack Obama said in a statement. "The last of America's first astronauts has left us, but propelled by their example we know that our future here on Earth compels us to keep reaching for the heavens. On behalf of a grateful nation, Godspeed, John Glenn."

President-elect Donald Trump tweeted that a "pioneer of space and air" was lost.

NASA tweeted its condolences, as did one of Canada's most famous astronauts, Chris Hadfield.

One of the few who could appreciate the pressures of the space race, Buzz Aldrin, paid homage to his friend.

The governor of Glenn's home state, John Kasich, called Glenn "Ohio's ultimate hometown hero."

With files from Reuters and The Associated Press