WASHINGTON — Two NASA astronauts successfully replaced a faulty battery charger during the agency’s first all-female spacewalk Oct. 18, an event that at times appeared to go better in orbit than on the ground.

NASA astronauts Christina Koch and Jessica Meir spent seven hours and 17 minutes outside the International Space Station during a spacewalk, carrying out their primary task of replacing a battery charge/discharge unit (BCDU) on one end of the station’s truss. Controllers confirmed during the spacewalk that a spare BCDU installed in place of the faulty unit was working properly.

NASA announced Oct. 15 that it was rescheduling a series of spacewalks that started Oct. 6 to replace batteries that are part of the station’s power supply after the BCDU unit failed to turn back on after the second in that series of five spacewalks Oct. 11. Koch and Meir, who had been scheduled to perform a spacewalk together Oct. 21 as part of the battery swap process, were instead assigned to this new spacewalk to replace the BCDU.

The remaining battery swap spacewalks have been postponed for up to a few weeks to allow engineers to study why this unit failed, and if it’s related to the failure of another BCDU elsewhere on the station earlier this year.

After replacing the faulty unit, the astronauts performed several other unrelated “get-ahead” tasks. That included installing hardware on the exterior of the station’s European Columbus module that will support an external experiment rank called Bartolomeo that be installed there next year.

The spacewalk was the first for Meir, who is the 15th woman — all but one American — to walk in space. The spacewalk was Koch’s fourth, who now has nearly 28 hours of EVA time.

The spacewalk gained extra attention because it was the first time two women walked in space together. Many hailed that historic milestone while also regretting that it took so long into the Space Age for it to take place.

Koch and Anne McClain had been set to make history with an all-woman spacewalk earlier this year, but NASA was forced to change spacewalk assignments when McClain found she needed a different sized suit than originally planned. That led to public criticism of NASA for not having the right sized suits.

“People are going to respond the way they respond,” NASA Administrator Jim Bridenstine said in a media briefing shortly before the start of the spacewalk when asked about the public reaction to both this spacewalk and the cancelled one from earlier this year. “We are focused on mission success. We want to make sure that, every time we do a spacewalk, we’re doing it with purpose, to accomplish objectives that are in the best interest of the United States of America.”

Prior to the spacewalk, agency officials said they selected Koch and Meir for the spacewalk because they were the best available based on their training and the need to balance workloads for them and the other astronauts on the station. “We have the right people doing the right job at the right time,” Bridenstine said. “We are confident that Christina Koch and Jessica Meir will be able to accomplish this mission.”

NASA, though, also played up the historic aspect of this spacewalk, with Bridenstine calling the two “an inspiration to the world.” At NASA Headquarters, the agency invited several members of Congress, including members of the House Science Committee and the House appropriations subcommittee that funds NASA, to sit in an operations room to watch the opening phases of the spacewalk.

In the middle of the spacewalk, Koch and Meir took a phone call from President Donald Trump at the White House, who congratulated them on the milestone. “What you do is incredible,” he said in comments that also played up NASA plans to return to the moon and, from there, go to Mars.

Trump, though, misstated the achievement, calling it “the first-ever female spacewalk.” Meir corrected him. “We don’t want to take too much credit, because there have been many other female spacewalkers before us,” she said. “This is just the first time that there have been two women outside at the same time.”

Earlier in the day, Ken Bowersox, a former astronaut who is the acting associate administrator for human exploration and operations, raised eyebrows when he suggested women weren’t as suited as men to perform spacewalks. “There are some physical reasons that make it harder, sometimes, for women to do spacewalks,” he said at the media briefing. He argued that, like professional basketball, taller people were better, which tended to favor men.

“Spacewalks are one of those areas where just how your body is built and shaped, it makes a difference in how well you can work the suit,” he said. He added later that a “certain amount of strength” was needed that tended to favor men.

“We also brought women into the crews because of their brains,” he added. “By using their brains, they can overcome a lot of those physical challenges.”

Bridenstine, who earlier emphasized that NASA’s next-generation suits would be designed to fit a much broader range of both women and men to overcome of the male-centric design biases of older suits, stepped in. “I think it’s also important to note that there are physical attributes of women that make them better at spaceflight than men,” he said, such as lower intracranial pressure that has been linked to eyesight problems during long-duration spaceflight.

“There are biological benefits that women have that men do not have to microgravity spaceflight,” he continued. “When we do different missions, it’s going to take all of America to do it.”