Gregory Korte

USA TODAY

WASHINGTON — President Obama praised former Sen. John Glenn, the first astronaut to orbit the earth, for his heroics in space and his service to his country on earth.

"With John's passing, our nation has lost an icon and Michelle and I have lost a friend," Obama said in a statement shortly after Glenn died Thursday at age 95.

Obama said Glenn's pioneering flight "reminded us that with courage and a spirit of discovery there's no limit to the heights we can reach together."

"John spent his life breaking barriers, from defending our freedom as a decorated Marine Corps fighter pilot in World War II and Korea, to setting a transcontinental speed record, to becoming, at age 77, the oldest human to touch the stars," Obama said. "John always had the right stuff, inspiring generations of scientists, engineers and astronauts who will take us to Mars and beyond — not just to visit, but to stay."

John Glenn, American space-race hero, dead at age 95

Obama also remembered Glenn as a Marine Corps fighter pilot and a "devoted public servant" during his quarter century representing Ohio in the U.S. Senate. Obama awarded Glenn the Presidential Medal of Freedom in 2012.

"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," Obama said.

Obama's tribute echoed the nationally televised words of Glenn's backup pilot when he launched into space Feb. 20, 1962: "On behalf of a grateful nation, Godspeed, John Glenn."