Two crew members of the space shuttle Discovery have completed the delicate rewiring of the International Space Station (ISS) during a third spacewalk.
But Astronauts Robert Curbeam and Sunita Williams struggled to fix a jammed solar panel on the ISS.
Nasa has approved a fourth spacewalk, due to take place on Monday, which will delay the shuttle's return by a day.
Mission Control said that the rewired electrical system was powered back up and now operating without problems.
The rewiring, delayed after the 2003 Columbia disaster, will provide a power upgrade to support extra equipment.
"It's great to have some good on-orbit electricians working for us," said Stephen Robinson from Nasa Mission Control in Houston, Texas.
Mr Curbeam, an experienced spacewalker, left the ISS ahead of Sunita Williams, who was beginning her first mission.
"Bye-bye Bob," she said as he exited the station.
"Welcome to the club, Suni," he replied when she emerged a few minutes later.
During the spacewalk the astronauts relocated debris shield panels, attached a grapple fixture and performed a test on the partially retracted solar array.
A solar panel on the space station failed to retract
After several attempts at fixing the jammed solar panel on the ISS, Nasa decided to halt the spacewalk as the astronauts' spacesuits were running short of supplies.
The array, which needs to be folded away to make room for new panels, jammed as the astronauts attempted to retract it by remote control.
It has been six years since the 35m (115ft) wing, which has served as the space station's primary power source, was deployed and it has not been retracted during that period.
New solar panels, fitted in September, will take over the job of powering the ISS, boosting its power by about 50%.
The mission is taking place to finish the $100bn (£50bn) station. At least 14 more missions are needed.
Discovery blasted off from Florida last weekend in the first night launch of a space shuttle in four years, after being delayed for two days because of bad weather.
Discovery's launch left a fiery trail in the Florida sky
The landing date is now expected to be 22 December back at the Kennedy Space Center.
Discovery's crew consists of Commander Mark Polansky, pilot William Oefelein and mission specialists Mr Curbeam, Joan Higginbotham, Nicholas Patrick, Ms Williams and the European Space Agency astronaut Christer Fuglesang.
A British-born astronaut, Nicholas Patrick, is among Discovery's crew. For five of the seven astronauts, this is their first shuttle flight.
Ms Williams will stay on at the ISS when Discovery heads home, taking German Thomas Reiter back to Earth.