The world's first spacewalker, Alexei Leonov, died in a Moscow hospital Friday (Oct. 11), but his legacy lives on aboard the International Space Station, where astronauts mourned the famed cosmonaut even as they ventured outside their home on a critical spacewalk.

"This is a bittersweet day for all of us on the International Space Station," station commander Luca Parmitano of the European Space Agency said as two NASA spacewalkers wrapped up their work.

Leonov died in Moscow at age 85 after an illness, according to Russian media reports. By coincidence, his death occurred as NASA astronauts Christina Koch and Andrew Morgan performed the second of a five planned spacewalks to replace vital batteries on the space station's solar arrays.

Video: Astronauts Mourn Alexei Leonov, the 1st Spacewalker

Related: How Leonov's Historic First Spacewalk Worked (Infographic)

NASA astronaut Andrew Morgan exits the Quest airlock on the International Space Station during a spacewalk on Oct. 11, 2019. He and crewmate Christina Koch spent over 6.5 hours replacing solar array batteries on the station. (Image credit: NASA TV)

The spacewalk, and all those before it, are the lasting legacy of Leonov's pioneering first spacewalk on March 18, 1985, station astronauts said. He spent 12 minutes outside his spacecraft during the then-Soviet Union's Voskhod 2 mission with crewmate Pavel Belayev.

"It is somewhat fitting that Leonov left us on the day of a spacewalk," Parmitano said. "His 12-minute excursion outside the Voskhod 2 spacecraft more than a half century ago began a chapter in human spaceflight that brought us to the moon, and which will bring the world to distant ports of exploration in the cosmos in the years ahead."

Video: Alexei Leonov Nearly Died on World's 1st Spacewalk

Image 1 of 6 Alexei Leonov, who performed the world's first spacewalk in 1965 and co-led the first joint mission between the U.S. and Russia, died on Friday, Oct. 11, 2019 in Moscow at age 85. (Image credit: Roscosmos) Image 2 of 6 Archived image from the Fédération Aéronautique Internationale report certifying the first spacewalk by Russian cosmonaut Alexei Leonov on March 18, 1965. (Image credit: FAI) Image 3 of 6 In 1975, Alexei Leonov (right) participated in the Apollo-Soyuz Test Project, which became the first crewed international spaceflight. This image from the flight shows Leonov with NASA astronaut Deke Slayton. (Image credit: NASA) Image 4 of 6 Cosmonaut Alexei Leonov aboard the Apollo-Soyuz Test Project with a sketch he made of one of his American crewmates. (Image credit: NASA) Image 5 of 6 Russian cosmonauts Oleg Kononenko and Alexey Ovchinin honor Alexei Leonov when conducting a spacewalk the day before his 85th birthday. (Image credit: NASA/Roscosmos) Image 6 of 6 An in-depth look at the world's first spacewalk by cosmonaut Alexei Leonov on March 18, 1965. (Image credit: By Karl Tate, Infographics Artist)

Leonov also commanded the Soyuz spacecraft on the historic Apollo-Soyuz Test Project, the joint U.S.-Soviet space mission that marked the first international cooperation in space. Today, the International Space Station — the product of 15 different countries and space agencies from the U.S., Russia, Canada, Japan and Europe — owes its existence to that first olive branch.

"As the 1st human to walk in space on March 18, 1965 and the commander of the Soyuz spacecraft 10 years later that gave birth to the human spaceflight cooperation that thrives today, and that we cherish on the International Space Station, Leonov was a pathfinder and pioneer in human spaceflight," NASA astronaut Jessica Meir radioed Mission Control from the station as the spacewalk ended.

Friday's spacewalk by Morgan and Koch lasted six hours and 45 minutes. That's 405 minutes, or just shy of 34 times the length of Leonov's Voskhod 2 spacewalk.

Morgan and Koch spent most of their spacewalk at the end of the station's backbone-like Port 6 truss replaced an old nickel-hydrogen solar array batteries with a new lithium-ion unit.

The pair performed a similar battery swap during a spacewalk on Oct. 5, and the third excursion in the five-EVA schedule is scheduled for Oct. 16 by a Meir and Morgan. On Oct. 21, Koch and Meir will venture outside on the first all-female spacewalk in history, with Parmitano and Meir closing out the series on Oct. 25.

Friday's spacewalk also occurred on the 35th anniversary of NASA's first spacewalk by a female astronaut, Kathy Sullivan, in 1984.

Koch and Morgan completed their main work well ahead of schedule, and even got in some extra tasks to prepare for another upcoming spacewalk. At times, like Leonov on his spacewalk, the astronauts marveled at the view.

"There's a good shot of the moon," Morgan told Koch during a break.

About the only hiccup occurred midway through the spacewalk when Mission Control lost a data stream from Koch's biomedical monitoring system. But Koch said all was well and that she felt fine.

"I am doing well, no issues at all. I would say biomed is probably the same it has been throughout the EVA," Koch said, using NASA's abbreviation for extravehicular activity, the technical term for a spacewalk.

In Pictures: The Most Memorable Spacewalks in History

Another five NASA spacewalks in November and December are aimed at repairing an ailing instrument on the station's exterior. Russian cosmonauts will also perform a spacewalk on Oct. 31.

Friday's spacewalk marked the 220th dedicated to space station construction or maintenance and the third career spacewalk for both Koch and Morgan. Koch has racked up 20 hours and 31 minutes of spacewalking time in her three EVAs. Morgan has 20 hours and 18 minutes under his belt.

To date, astronauts have spent 57 days, 13 hours and 12 minutes spacewalking outside the station since construction began in 1998.

Image 1 of 2 NASA astronauts Andrew Morgan and Christina Koch spent more than 6.5 hours replacing solar array batteries on the International Space Station during a spacewalk on Oct. 11, 2019, the day cosmonaut Alexei Leonov, the first spacewalker in history, died. (Image credit: NASA TV) Image 2 of 2 NASA astronauts Andrew Morgan and Christina Koch spent more than 6.5 hours replacing solar array batteries on the International Space Station during a spacewalk on Oct. 11, 2019, the day cosmonaut Alexei Leonov, the first spacewalker in history, died. (Image credit: NASA TV)

On Friday, Morgan thanked Mission Control and station flight controllers for their excellent planning, but said the job isn't over yet.

"My challenge to everyone is to remain vigilant," Morgan said as the spacewalk concluded. "We're tin the first quarter of an entire season of EVAs and we'll treat each one with respect, as if it was an isolated event. We're all in this together, and it's cool to be part of a team."

And in the end, Parmitano took a moment to honor Leonov's memory for making it all possible.

"Farewell Alexei, and ad astra."

Email Tariq Malik at tmalik@space.com or follow him @tariqjmalik. Follow us @Spacedotcom and Facebook.