CAPE CANAVERAL, Fla. — Two spacewalking astronauts successfully rewired half of the international space station on Thursday, a job that when finished will allow the orbiting outpost to double the size of its crew and add two more labs in the coming years.

Flight controllers on the ground happily reported to the space station that power was flowing through two electrical channels hooked up by astronauts Robert Curbeam and Christer Fuglesang.

“Excellent. Excellent,” said astronaut William Oefelein, who was coordinating the spacewalk from inside the orbiting outpost, which has a crew of three.

NASA immediately started powering up systems aboard a large section of the space station; the power had to be turned off for the spacewalkers’ safety while they were handling the electrical connections.

The space agency also rushed to get the space station’s ammonia cooling system operating again before the new electrical equipment overheated. It took less than an hour for the cooling system to start running smoothly.

It was the second spacewalk for Curbeam and Fuglesang since the space shuttle Discovery arrived at the orbiting lab for a seven-day visit. The five-hour foray ended at 7:41 p.m., a full hour earlier than planned.

From the old to the new
The rewiring job involved switching the space station from its old, temporary power source to its new one — a pair of solar arrays that were delivered in September. The spacewalkers had to unhook three dozen electrical hoses and reconnect them. The astronauts also completed some housekeeping tasks.

This trip outside the spacecraft brings the total of spacewalking time dedicated to assembling the space station to 455 hours and 50 minutes, said NASA spokeswoman Nicole Cloutier.

During a short break, the spacewalkers watched shooting stars and the blaze of the aurora borealis, or northern lights phenomenon, which is caused by solar flares colliding with Earth’s atmosphere. A solar flare earlier this week forced the astronauts to sleep in protective areas of the station and shuttle as a precaution.

“Gosh, they’re beautiful,” Curbeam said.

A third spacewalk set for Saturday will repeat the rewiring job, but on the flip side of the station’s U.S. segment.

Before the start of the spacewalk, NASA flight controllers on the ground powered down sections of the station, losing some of the redundancy the space agency likes to have in its systems.

Slideshow: Planetary pleasures
Half the lights in the station’s U.S. laboratory went dark. Cameras at the station stopped working and some ventilation ducts were turned off. Communication between the U.S. and Russian sides of the space station was cut off.

Even a smoke detector was turned off. Mission Control, as a precaution, asked astronaut Nicholas Patrick if he smelled smoke. He said no.

The spacewalk required careful choreography. The plan called for Fuglesang to work in an area called “the rat’s nest” because it is a tight corner jammed with power hoses.

An extra spacewalk?
NASA was considering a fourth spacewalk in which astronauts could manually fold up the old solar array, which failed to retract fully by remote control on Wednesday. The accordion-like 115-foot array, which had provided temporary power to the space station, retracted about halfway — enough to allow the new pair of solar arrays to rotate.

The half-retracted array presents no danger, NASA said. In a worst-case scenario, it could be jettisoned.

“It’s a little disappointing with the solar array, but folks ... understand you’re going to have a little hiccup,” said Joel Montalbano, a space station flight director. “NASA probably does its best with their back against the wall.”

The 12 orbiting astronauts on the International Space Station were hailed by the chief on Thursday — and also got a humorous scolding for keeping their android crewmate locked up in its packing for so long.