In this image taken from NASA video, NASA astronaut Chris Cassidy works outside the International Space Station on Thursday, July 16, 2020. Cassidy and Bob Behnken ventured out on their third spacewalk over the past few weeks to remove six more old batteries in the space station's power grid, and replace them with new, improved ones. (NASA via AP)

A pair of spacewalking astronauts tackled the final set of battery swaps outside the International Space Station on Thursday.

NASA's Bob Behnken and Chris Cassidy ventured out on their third spacewalk over the past few weeks. They needed to remove six more old batteries in the space station's power grid, and replace them with new, improved ones.

"Have fun out there," astronaut Doug Hurley urged from inside.

The new lithium-ion batteries—big, boxy units with a mass of around 400 pounds (180 kilograms )—are so powerful that only half as many are needed. The batteries store power gathered by the station's solar panels for use on the nighttime side of Earth.

The battery replacements began 3 1/2 years ago, with 48 old batteries targeted for replacement. Behnken and Cassidy will conduct a fourth and final spacewalk next week to complete the job.

Behnken arrived at the space station at the end of May on a SpaceX capsule, the company's first astronaut flight. He and Hurley are scheduled to return to Earth in the Dragon capsule in early August.

Cassidy is serving as the space station commander. He's halfway through a six-month mission; a Russian Soyuz capsule is his ride to and from the orbiting outpost.

Both Behnken and Cassidy each now have nine spacewalks to their credit.