Legendary cosmonaut Alexei Leonov, the first human to walk in space — an experience that almost killed him — and later the commander of the Russian Soyuz spacecraft that docked with a NASA Apollo capsule, symbolizing a historic thaw in the Cold War, has died after a long illness, the Russian space agency confirmed Friday. He was 85.

An accomplished amateur artist and a widely respected statesman in the international space community, Leonov remained a lifelong friend of his Apollo-Soyuz Test Project crewmates and a source of inspiration to a younger generation of cosmonauts who carried his photo to the International Space Station and marked his 85th birthday during a spacewalk in May.

"Leonov was certainly a cosmonaut's cosmonaut, he was stout of mind, body and heart," James Oberg, an expert on the Russian space program, said in an interview with CBS Radio. "He came through as a real tough guy who could handle problems, including almost being killed on his first spacewalk. But he also was a very decent human being."

Alexei Leonov listens to Danish astronaut Andreas Mogensen speak at the London Science Museum ahead of the launch of space mission Principia on December 15, 2015 in London, United Kingdom. Ben Pruchnie / Getty Images

Said retired astronaut Scott Kelly in a Twitter posting: Cosmonaut #AlexeiLeonov passed away today in Moscow. He was not only the first person to walk in space, but also an accomplished artist. Most significant, however, he was a great human being. Fair winds and following seas my friend."

Cosmonaut #AlexeiLeonov passed away today in Moscow. He was not only the first person to walk in space, but also an accomplished artist. Most significant, however, he was a great human being. Fair winds and following seas my friend. #RIP pic.twitter.com/sOELAZMPte — Scott Kelly (@StationCDRKelly) October 11, 2019

The news of Leonov's passing came as two astronauts aboard the International Space Station were beginning a 6.5 hour spacewalk to replace batteries in the lab's solar power system, the 220th spacewalk devoted to station assembly and maintenance since construction began in 1998.

Get Breaking News Delivered to Your Inbox

"Here's a toast to a great man whose kindness and mentorship impacted so many explorers," tweeted astronaut Jack Fischer. "On a day when two astronauts carry on the spacewalking tradition he started, his legacy is obvious."

Added moonwalker Buzz Aldrin: "The cosmonaut ambassador to the world. A great pleasure to be his friend. He tried for the moon but we made it. ... Farewell and Godspeed Alexi."

Speaking to the NASA interviewer 50 years later, Leonov said "I really don't know how I managed to turn and go with my legs first. I was running a fever, I was sweating, I could not see much because of the sweat."

Alexei Leonov, floating outside his Voskhod 2 spacecraft in March 1965 during history's first spacewalk. Fédération Aéronautique Internationale via CollectSpace.com

Oberg said Leonov "always regretted and apologized in later years that he had been given written statements to give the press about how easy it was and how their training was perfect when, in fact, he said, it was just the opposite. He nearly died."

Leonov and Belyayev returned to Earth on March 19, 1965, landing nearly 240 miles off course after their Soyuz descent module did not properly separate from from an upper compartment. Compared to the pinpoint landings Soyuz spacecraft make today returning from the International Space Station, Leonov's landing reads like an action adventure.

"The capsule's radio beacon antenna broke off while landing among the trees, making it more difficult for the rescue forces to locate them," Newkirk wrote. "Since there were no clearings nearby for helicopters to land, it would be the next day until rescue forces reached the capsule.

"The cosmonauts were forced to retreat to the capsule after meeting timber wolves that night and had to hold the hatch closed ... while trying to rest in the very uncomfortable spacesuits. After skiing to recovery helicopters the next day, they were airlifted back to Star City."

Leonov's second spaceflight came in July 1975 when he and cosmonaut Valeri Kubasov blasted off from the Baikonur Cosmodrome and then stood by in orbit while a NASA Apollo capsule carrying astronauts Tom Stafford, Vance Brand and Mercury 7 astronaut Deke Slayton caught up for a historic rendezvous.

Commander of the Soviet crew of Soyuz, Alexei Leonov (L) and commander of the American crew of Apollo, Thomas Stafford (R), shake hands 17 July 1975 in the space, somewhere over Western Germany, after the Apollo-Soyuz docking maneuvers. AFP/Getty Images

The mission grew out of a treaty signed by the United States and the Soviet Union in 1972. It became one of the symbolic highlights of the era of detente when Cold War relations between the United States and the Soviet Union were easy after three decades of nuclear brinksmanship.

After their linkup in space, Leonov welcomed Stafford with a handshake, smiling broadly. He would be promoted to general after the flight and go on to hold a variety of posts in the Russian space program and remained an active observer and a familiar face at Soyuz launchings long after retiring from an active role.

He and Stafford remained life-long friends.

"He was absolutely open and honest," Oberg said. "He didn't think twice about the effect or propriety of what he was going to be saying. He had his opinions, they were very well grounded in reality. ... But he was also genuinely compassionate and generous to people around him. So, as a fine human being, the first person to walk among the stars and now walking further among the stars, he was a marvelous selection, and the first person to shake hands in space with an American."

A close friend of cosmonaut Yuri Gagarin, the first human in space, Leonov joined Pavel Belyayev aboard the two-seat Voskhod 2 spacecraft and rocketed into orbit on March 18, 1965. It was the seventh piloted spaceflight launched by the Soviet Union and the 16th overall.

The flight came in the heated early days of the Cold War space race when the Soviet Union was chalking up an impressive lists of "firsts" while carrying out flights in near total secrecy. Knowing NASA was planning spacewalks in its Gemini program, Russia beat the U.S. space agency to the punch once again with the Voskhod 2 mission.

Alexei Leonov presents a drawing of Stephen Hawking to the physicist during a 2015 visit to the Science Museum, London. Science Museum Group

Using a jury-rigged inflatable airlock on the side of the Voskhod spacecraft, Leonov floated outside his spacecraft for what turned out to be a 12-minute spacewalk. Grainy video and photos released after the fact showed the cosmonaut floating against the backdrop of planet Earth, arms spread out like a skydiver.

"The most vivid impression of my life has to do with the fact that not only was I in a (spacesuit), but I found myself to be surrounded with the stars," he told a NASA interviewer on the 50th anniversary of the historic outing. "Stars were on the right hand side and the Earth was on the left hand side, and there was just enormous, unbelievable silence.

"The ability to see the whole Earth as a globe is something that was extremely attractive, and I could easily recognize the Black Sea, the Crimea, Romania, Bulgaria, Italy. ... and it was all within minutes, if not seconds," he said. "But the most (lasting) impression had to do with the silence.

"I hear how my heart was pounding," he recalled, speaking through a translator, "I could hear myself breathe."

He said the British writer Arthur C. Clarke and director Stanley Kubrick, working on the film "2001: A Space Odyssey," captured that impression in the movie's soundtrack. And then there were the stars.

"The stars were very bright," Leonov said. "They were everywhere. They were above, they were beneath. On the ground, you can only see stars up in the sky. In space, they are everywhere."

Because of the stiffness of his pressurized spacesuit, Leonov ran into major problems getting back inside the Voskhod spacecraft, only succeeding by risking the bends and lowering the pressure enough to squeeze through the hatch like a contortionist.

"After several futile attempts at bending his legs into the airlock, he had to dangerously reduce air pressure in the suit ... to reduce the ballooning effect," Dennis Newkirk wrote in "Almanac of Soviet Manned Space Flight."

"He found he still could not bend enough to go in feet first, and instead, went head first into the airlock. He somehow managed to turn around in the flexible airlock tube to reach the outer hatch and close it. ... Leonov later said said he was on the verge of a heat stoke and covered with sweat. He lost (12 pounds) of body weight that day."