CAPE CANAVERAL, Fla. -- Spacewalking astronauts completed urgent repairs at the International Space Station on Tuesday, replacing equipment that failed three days earlier and restoring a backup for a vital data-relay system.

It took commander Peggy Whitson much longer than expected to install the spare unit. Success finally came after her spacewalking partner, Jack Fischer, blasted the area with nitrogen gas to clear away flecks of metal.

Mission Control noted that the failure occurred only 2 days, 21 hours, 38 minutes earlier, "and we are already back in a good position, so excellent work. "

Testing confirmed the new unit worked, restoring full redundancy to the system that operates the space station's solar panels, radiators and robotic equipment.

"Very good. We are really happy about that," Whitson said.

Tuesday's spacewalk lasted less than three hours -- exceedingly short by NASA standards. Whitson has now tied the record for most spacewalks by an American -- 10 -- and moved up to third place on the all-time spacewalking list.

The failed data-relay unit -- recently refurbished with upgraded software -- was just installed in March. Even though a second unit worked just fine after Saturday's breakdown, NASA scrambled to put together a spacewalk so there would be a backup in case that second unit failed, too, crippling the system for station cooling and solar energy production.

Whitson had no trouble removing the broken unit. But it took her two tries to install the replacement.

During the first attempt, Whitson discovered what appeared to be metal shavings in the holes for the bolts. Fischer used a cleaning tool -- essentially a nitrogen gas blaster -- and blew away debris from the three holes.

"I think all three look clean as a whistle," he reported before Whitson bolted down the spare box.

The data-relay boxes are officially known as MDMs or multiplexer-demultiplexers. They're compact: Each one weighs 50 pounds (22 kilograms) and measures 14 by 8 by 13 inches (35-20-33 centimetres.)

Whitson and Fischer were just out spacewalking on May 12. That excursion was cut short by leaking station equipment, leaving two antenna installations undone. So Fischer completed the chore Tuesday.

It was only the second spacewalk for Fischer, a rookie astronaut who arrived at the orbiting lab last month. He marveled at the world 250 miles (400 kilometres) below as he worked, commenting, "Oh my gosh, it's so beautiful."

"What's more awesome than being on @Space_Station? Getting a call from mission control 4 another spacewalk! Dancing w/ the cosmos," he said in a tweet before going out.

Whitson, the world's most experienced female astronaut, is more than halfway through an extended 9 1/2-month mission, her third spaceflight. She's spent more time off the planet than any other American and, at age 57, is the oldest woman to ever fly in space. Tuesday's excursion gave her 60 hours out in the vacuum, behind only Russia's Anatoly Solovyev, with 78 hours over 16 spacewalks, and fellow American 10-time spacewalker Michael Lopez-Alegria, with more than 67 hours over 10 trips.

The space station also is home to two Russians and a Frenchman.